getpw(3) Library Functions Manual getpw(3) getpw - LIBRARY Standard C library (libc, -lc) #define _GNU_SOURCE /* feature_test_macros(7) */ #include #include [[deprecated]] int getpw(uid_t uid, char *buf); getpw() ID uid buf. name:passwd:uid:gid:gecos:dir:shell passwd : struct passwd { char *pw_name; /* */ char *pw_passwd; /* */ uid_t pw_uid; /* */ gid_t pw_gid; /* */ char *pw_gecos; /* */ char *pw_dir; /* */ char *pw_shell; /* */ }; passwd(5). getpw() 0; -1, errno . uid , getpw() -1, errno 0 buf . 0 ENOENT uid. EINVAL buf NULL. ENOMEM passwd. /etc/passwd , attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |getpw() | | MT-Safe locale | +----------------------------+----------------------------------------------------------+--------------------------+ None. SVr2. getpw() - , buf. getpwuid(3). . endpwent(3), fgetpwent(3), getpwent(3), getpwnam(3), getpwuid(3), putpwent(3), setpwent(3), passwd(5) Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . getpw(3)