Describes password 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 gid_t and uid_t 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 *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);
The endpwent, getpwnam, getpwuid, and getpwuid_r subroutines.
The sys/types.h header file.