| Red Hat Documentation: man pages: man3: Linux Programmer's Manual (3) |
GETPWNAMSection: Linux Programmer's Manual (3)Updated: May 27, 2025 Index NAMEgetpwnam, getpwuid - get password file entrySYNOPSIS#include <pwd.h> #include <sys/types.h> struct passwd *getpwnam(const char * name); struct passwd *getpwuid(uid_t uid); DESCRIPTIONThe getpwnam() function returns a pointer to a structure containing the broken out fields of a line from /etc/passwd for the entry that matches the user name name.The getpwuid() function returns a pointer to a structure containing the broken out fields of a line from /etc/passwd for the entry that matches the user uid uid. The passwd structure is defined in <pwd.h> as follows:
RETURN VALUEThe getpwnam() and getpwuid() functions return the passwd structure, or NULL if the matching entry is not found or an error occurs.ERRORS
FILES
CONFORMING TOSVID 3, POSIX, BSD 4.3SEE ALSO
IndexThis document was created by using the manual pages. Time: 11:58:04 GMT, March 24, 2025 |
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |