PWD.H(7) Miscellaneous Information Manual PWD.H(7)

pwd.hpassword structure

#include <pwd.h>

The <pwd.h> header provides a definition for struct passwd , which includes at least the following members:

char    *pw_name   user's login name
uid_t    pw_uid    numerical user ID
gid_t    pw_gid    numerical group ID
char    *pw_dir    initial working directory
char    *pw_shell  program to use as shell

The and types are defined as described in <sys/types.h>.

The following are declared as functions and may also be defined as macros. Function prototypes must be provided for use with an ISO C compiler. struct passwd *getpwnam(const char *); struct passwd *getpwuid(uid_t); int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); void endpwent(void); struct passwd *getpwent(void); void setpwent(void);

None.

None.

endpwent(3) , getpwnam(3) , getpwuid(3) , getpwuid(3) , <sys/types.h> .

February 1997 posix.fail