1<pwd.h>(P) POSIX Programmer's Manual <pwd.h>(P)
2
3
4
6 pwd.h - password structure
7
9 #include <pwd.h>
10
12 The <pwd.h> header shall provide a definition for struct passwd, which
13 shall include at least the following members:
14
15
16 char *pw_name User's login name.
17 uid_t pw_uid Numerical user ID.
18 gid_t pw_gid Numerical group ID.
19 char *pw_dir Initial working directory.
20 char *pw_shell Program to use as shell.
21
22 The gid_t and uid_t types shall be defined as described in
23 <sys/types.h> .
24
25 The following shall be declared as functions and may also be defined as
26 macros. Function prototypes shall be provided.
27
28
29 struct passwd *getpwnam(const char *);
30 struct passwd *getpwuid(uid_t);
31
32 int getpwnam_r(const char *, struct passwd *, char *,
33 size_t, struct passwd **);
34 int getpwuid_r(uid_t, struct passwd *, char *,
35 size_t, struct passwd **);
36
37
38 void endpwent(void);
39 struct passwd *getpwent(void);
40 void setpwent(void);
41
42
43 The following sections are informative.
44
46 None.
47
49 None.
50
52 None.
53
55 <sys/types.h> , the System Interfaces volume of IEEE Std 1003.1-2001,
56 endpwent(), getpwnam(), getpwuid()
57
59 Portions of this text are reprinted and reproduced in electronic form
60 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
61 -- Portable Operating System Interface (POSIX), The Open Group Base
62 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
63 Electrical and Electronics Engineers, Inc and The Open Group. In the
64 event of any discrepancy between this version and the original IEEE and
65 The Open Group Standard, the original IEEE and The Open Group Standard
66 is the referee document. The original Standard can be obtained online
67 at http://www.opengroup.org/unix/online.html .
68
69
70
71IEEE/The Open Group 2003 <pwd.h>(P)