Library /sys$common/syshlp/helplib.hlb  —  CRTL  getpwent  Description
    The getpwent function returns a pointer to a structure containing
    fields whose values are derived from an entry in the user
    database. Entries in the database are accessed sequentially by
    getpwent. When first called, getpwent returns a pointer to a
    passwd structure containing the first entry in the user database.
    Thereafter, it returns a pointer to a passwd structure containing
    the next entry in the user database. Successive calls can be used
    to search the entire user database.

    The passwd structure is defined in the <pwd.h> header file as
    follows:

    pw_name    The name of the user.
    pw_uid     The ID of the user.
    pw_gid     The group ID of the principle group of the user.
    pw_dir     The home directory of the user.
    pw_shell   The initial program for the user.

    If an end-of-file or an error is encountered on reading, getpwent
    returns a NULL pointer.

    Because getpwent accesses the user authorization file (SYSUAF)
    directly, the process must have appropriate privileges enabled or
    the function will fail.

                                  NOTES

       All information generated by the getpwent function is stored
       in a per-thread static area and is overwritten on subsequent
       calls to the function.

       Password file entries that are too long are ignored.
Close Help