pwd.h(7POSIX)
πΈ pwd.h(7POSIX) πΈ
okay bestie, so this little cutie is a POSIX Programmer's Manual page β like, from the POSIX girlies themselves, not the Linux girlies. π
β¨ PROLOG β¨
This manual page is part of the POSIX Programmer's Manual, periodt. But heads up: the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may not even be implemented on Linux at all. π
π NAME π
pwd.h β password structure. that's it, that's the name. iconic.
π SYNOPSIS π
#include <pwd.h>
π¦ DESCRIPTION π¦
So the <pwd.h> header shall define the struct passwd structure, and it has to include at least these members, no cap:
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.
Then, the <pwd.h> header shall define the gid_t, uid_t, and size_t types, exactly as described over in <sys/types.h>. slay, cross-header teamwork. π€
And the following shall be declared as functions β they may also be defined as macros, and function prototypes shall be provided, bestie, that's not optional:
void endpwent(void);
struct passwd *getpwent(void);
struct passwd *getpwnam(const char *);
int getpwnam_r(const char *, struct passwd *, char *,
size_t, struct passwd **);
struct passwd *getpwuid(uid_t);
int getpwuid_r(uid_t, struct passwd *, char *,
size_t, struct passwd **);
void setpwent(void);
The following sections are informative β like, they're the vibes, not the rules. π«
π APPLICATION USAGE π
None. literally nothing. we're all booked and busy. π
β RATIONALE β
None. again, nothing. the reasoning is simply not giving today. π«Ά
π₯ FUTURE DIRECTIONS π₯
None. the future is unknown and honestly that's on brand. π§
π SEE ALSO π
<sys_types.h>
And from the System Interfaces volume of POSIX.1β2017: endpwent(), getpwnam(), getpwuid() β go read those, they're the main characters of this whole friend group. π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
and if there's ever any discrepancy between this version and the original IEEE and The Open Group Standard β the original IEEE and The Open Group Standard is the referee document. it wins. always. no debate. βοΈ
The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
okay that's the whole page, you ate that fr fr. this diva was brought to you by IEEE/The Open Group, 2017 β mwah, sending you the biggest kiss, go forth and getpwnam() responsibly πβ¨π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms