Accesses user-name information in the user database.
#include <pwd.h> struct passwd *getpwnam (const char name);
The passwd structure is defined in the <pwd.h> header file as follows:
pw_name | The user's login name. |
pw_uid | The numerical user ID. |
pw_gid | The numerical group ID. |
pw_dir | The home directory of the user. |
pw_shell | The initial program for the user. |
x | A pointer to a valid password structure. |
NULL | An error occurred. errno is set to indicate the error. |