#include <sys/types.h> #include <pwd.h>
struct passwd *getpwuid(uid_t uid)
struct passwd *getpwnam(const char *name)
struct passwd *getpwent(void);
void setpwent(void);
void endpwent(void);
void setpwfile(char *name);
The passwd structure is defined in the header <pwd.h> and includes the following members:
The passwd structure may contain more implementation-specific members than those listed here;see passwd.5 for more information.
The BSD routines setpwent, getpwent, endpwent, and setpwfile may be used to scan the user database sequentially. setpwent resets the current user password structure to the first in the database, getpwent reads and returns the next user password entry, and endpwent closes the user password database when processing is complete. In addition, setpwfile may be called to set the database to that given in file name, which is a file in passwd.5 format. Setpwfile doesn't close the previous password file; endpwent should be used before setpwfile.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97