Programming and posix - April 2002
April 3, 2002
Solution Symposium
Page 46
hp e3000
programming
and posix
user management -
getpwnam()/getpwuid()
• struct passwd *getpwnam(const char *name);
• struct passwd *getpwuid(uid_t uid);
• reads from virtual /etc/passwd user directory file
• /etc/passwd does not exist on MPE
• selected struct passwd fields from /usr/include/pwd.h
• pw_name - user name (USER.ACCOUNT)
• pw_uid - POSIX UID
• pw_gid - POSIX GID
• pw_dir - initial working directory (MPE home group)
• pw_shell - initial shell (/SYS/PUB/CI)