1pwd.h(0P) POSIX Programmer's Manual pwd.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 pwd.h — password structure
13
15 #include <pwd.h>
16
18 The <pwd.h> header shall define the struct passwd, structure, which
19 shall include at least the following members:
20
21
22 char *pw_name User's login name.
23 uid_t pw_uid Numerical user ID.
24 gid_t pw_gid Numerical group ID.
25 char *pw_dir Initial working directory.
26 char *pw_shell Program to use as shell.
27
28 The <pwd.h> header shall define the gid_t, uid_t, and size_t types as
29 described in <sys/types.h>.
30
31 The following shall be declared as functions and may also be defined as
32 macros. Function prototypes shall be provided.
33
34
35 void endpwent(void);
36 struct passwd *getpwent(void);
37 struct passwd *getpwnam(const char *);
38 int getpwnam_r(const char *, struct passwd *, char *,
39 size_t, struct passwd **);
40 struct passwd *getpwuid(uid_t);
41 int getpwuid_r(uid_t, struct passwd *, char *,
42 size_t, struct passwd **);
43 void setpwent(void);
44
45 The following sections are informative.
46
48 None.
49
51 None.
52
54 None.
55
57 <sys_types.h>
58
59 The System Interfaces volume of POSIX.1‐2017, endpwent(), getpwnam(),
60 getpwuid()
61
63 Portions of this text are reprinted and reproduced in electronic form
64 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
65 table Operating System Interface (POSIX), The Open Group Base Specifi‐
66 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
67 Electrical and Electronics Engineers, Inc and The Open Group. In the
68 event of any discrepancy between this version and the original IEEE and
69 The Open Group Standard, the original IEEE and The Open Group Standard
70 is the referee document. The original Standard can be obtained online
71 at http://www.opengroup.org/unix/online.html .
72
73 Any typographical or formatting errors that appear in this page are
74 most likely to have been introduced during the conversion of the source
75 files to man page format. To report such errors, see https://www.ker‐
76 nel.org/doc/man-pages/reporting_bugs.html .
77
78
79
80IEEE/The Open Group 2017 pwd.h(0P)