The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group


pwd.h - 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 *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);






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

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]