fgetpwent(3) Library Functions Manual fgetpwent(3) fgetpwent - Standard C library (libc, -lc) #include #include #include struct passwd *fgetpwent(FILE *stream); glibc (. feature_test_macros(7)): fgetpwent(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _SVID_SOURCE fgetpwent() , stream. ; . stream /etc/passwd ( passwd(5)). 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; /* */ }; The fgetpwent() function returns a pointer to a passwd structure, or NULL if there are no more entries or an error occurs. In the event of an error, errno is set to indicate the error. ENOMEM passwd. /etc/passwd , attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |fgetpwent() | | MT-Unsafe race:fgetpwent | +----------------------------+----------------------------------------------------------+--------------------------+ . SVr4. endpwent(3), fgetpwent_r(3), fopen(3), getpw(3), getpwent(3), getpwnam(3), getpwuid(3), putpwent(3), setpwent(3), passwd(5) () Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux man-pages 6.12 23 2024 . fgetpwent(3)