1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-07-15 16:08+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man3/fgetgrent.3:30
26 #: build/C/man3/fgetgrent.3:30 build/C/man3/fgetpwent.3:33 build/C/man3/getspnam.3:8 build/C/man3/putpwent.3:30
32 #: build/C/man3/fgetgrent.3:30 build/C/man3/fgetpwent.3:33 build/C/man3/getgrent_r.3:24 build/C/man3/getgrouplist.3:29 build/C/man3/getpw.3:32 build/C/man3/getpwent.3:33 build/C/man3/getpwent_r.3:24 build/C/man3/getpwnam.3:37 build/C/man3/getspnam.3:8 build/C/man3/initgroups.3:32 build/C/man3/putgrent.3:7 build/C/man3/putpwent.3:30 build/C/man3/setaliasent.3:9
38 #: build/C/man3/fgetgrent.3:30 build/C/man3/fgetpwent.3:33 build/C/man5/ftpusers.5:19 build/C/man3/getgrent.3:30 build/C/man3/getgrent_r.3:24 build/C/man3/getgrnam.3:33 build/C/man3/getgrouplist.3:29 build/C/man3/getpw.3:32 build/C/man3/getpwent.3:33 build/C/man3/getpwent_r.3:24 build/C/man3/getpwnam.3:37 build/C/man3/getspnam.3:8 build/C/man5/group.5:26 build/C/man3/initgroups.3:32 build/C/man5/passwd.5:30 build/C/man3/putgrent.3:7 build/C/man3/putpwent.3:30 build/C/man3/setaliasent.3:9
40 msgid "Linux Programmer's Manual"
44 #: build/C/man3/fgetgrent.3:31 build/C/man3/fgetpwent.3:34 build/C/man5/ftpusers.5:20 build/C/man3/getgrent.3:31 build/C/man3/getgrent_r.3:25 build/C/man3/getgrnam.3:34 build/C/man3/getgrouplist.3:30 build/C/man3/getpw.3:33 build/C/man3/getpwent.3:34 build/C/man3/getpwent_r.3:25 build/C/man3/getpwnam.3:38 build/C/man3/getspnam.3:9 build/C/man5/group.5:27 build/C/man3/initgroups.3:33 build/C/man5/passwd.5:31 build/C/man3/putgrent.3:8 build/C/man3/putpwent.3:31 build/C/man3/setaliasent.3:10
50 #: build/C/man3/fgetgrent.3:33
51 msgid "fgetgrent - get group file entry"
55 #: build/C/man3/fgetgrent.3:33 build/C/man3/fgetpwent.3:36 build/C/man3/getgrent.3:33 build/C/man3/getgrent_r.3:27 build/C/man3/getgrnam.3:36 build/C/man3/getgrouplist.3:32 build/C/man3/getpw.3:35 build/C/man3/getpwent.3:36 build/C/man3/getpwent_r.3:27 build/C/man3/getpwnam.3:40 build/C/man3/getspnam.3:13 build/C/man3/initgroups.3:35 build/C/man3/putgrent.3:10 build/C/man3/putpwent.3:33 build/C/man3/setaliasent.3:13
61 #: build/C/man3/fgetgrent.3:38
64 "B<#include E<lt>stdio.hE<gt>>\n"
65 "B<#include E<lt>sys/types.hE<gt>>\n"
66 "B<#include E<lt>grp.hE<gt>>\n"
70 #: build/C/man3/fgetgrent.3:40
72 msgid "B<struct group *fgetgrent(FILE *>I<stream>B<);>\n"
76 #: build/C/man3/fgetgrent.3:45 build/C/man3/fgetpwent.3:48 build/C/man3/getgrent.3:48 build/C/man3/getgrent_r.3:43 build/C/man3/getgrnam.3:57 build/C/man3/getgrouplist.3:42 build/C/man3/getpwent.3:51 build/C/man3/getpwent_r.3:43 build/C/man3/getpwnam.3:61 build/C/man3/getspnam.3:61 build/C/man3/initgroups.3:46 build/C/man3/putpwent.3:45
77 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
81 #: build/C/man3/fgetgrent.3:49
82 msgid "B<fgetgrent>(): _SVID_SOURCE"
86 #: build/C/man3/fgetgrent.3:49 build/C/man3/fgetpwent.3:52 build/C/man5/ftpusers.5:22 build/C/man3/getgrent.3:68 build/C/man3/getgrent_r.3:51 build/C/man3/getgrnam.3:67 build/C/man3/getgrouplist.3:46 build/C/man3/getpw.3:43 build/C/man3/getpwent.3:62 build/C/man3/getpwent_r.3:50 build/C/man3/getpwnam.3:71 build/C/man3/getspnam.3:72 build/C/man5/group.5:29 build/C/man3/initgroups.3:50 build/C/man5/passwd.5:33 build/C/man3/putgrent.3:16 build/C/man3/putpwent.3:49 build/C/man3/setaliasent.3:31
92 #: build/C/man3/fgetgrent.3:63
94 "The B<fgetgrent>() function returns a pointer to a structure containing the "
95 "group information from the file referred to by I<stream>. The first time it "
96 "is called it returns the first entry; thereafter, it returns successive "
97 "entries. The file referred to by I<stream> must have the same format as "
98 "I</etc/group> (see B<group>(5))."
102 #: build/C/man3/fgetgrent.3:65 build/C/man3/getgrent.3:92 build/C/man3/getgrent_r.3:68 build/C/man3/getgrnam.3:86
103 msgid "The I<group> structure is defined in I<E<lt>grp.hE<gt>> as follows:"
107 #: build/C/man3/fgetgrent.3:74
111 " char *gr_name; /* group name */\n"
112 " char *gr_passwd; /* group password */\n"
113 " gid_t gr_gid; /* group ID */\n"
114 " char **gr_mem; /* group members */\n"
119 #: build/C/man3/fgetgrent.3:76 build/C/man3/fgetpwent.3:81 build/C/man3/getgrent.3:106 build/C/man3/getgrent_r.3:101 build/C/man3/getgrnam.3:136 build/C/man3/getgrouplist.3:78 build/C/man3/getpw.3:72 build/C/man3/getpwent.3:103 build/C/man3/getpwent_r.3:103 build/C/man3/getpwnam.3:143 build/C/man3/getspnam.3:216 build/C/man3/initgroups.3:68 build/C/man3/putgrent.3:42 build/C/man3/putpwent.3:70 build/C/man3/setaliasent.3:89
125 #: build/C/man3/fgetgrent.3:86
127 "The B<fgetgrent>() function returns a pointer to a I<group> structure, or "
128 "NULL if there are no more entries or an error occurs. In the event of an "
129 "error, I<errno> is set to indicate the cause."
133 #: build/C/man3/fgetgrent.3:86 build/C/man3/fgetpwent.3:91 build/C/man3/getgrent.3:129 build/C/man3/getgrent_r.3:108 build/C/man3/getgrnam.3:174 build/C/man3/getpw.3:78 build/C/man3/getpwent.3:125 build/C/man3/getpwent_r.3:110 build/C/man3/getpwnam.3:181 build/C/man3/getspnam.3:229 build/C/man3/initgroups.3:75 build/C/man3/putpwent.3:78
139 #: build/C/man3/fgetgrent.3:87 build/C/man3/fgetpwent.3:92 build/C/man3/getgrent.3:142 build/C/man3/getgrnam.3:196 build/C/man3/getpw.3:87 build/C/man3/getpwent.3:140 build/C/man3/getpwnam.3:203 build/C/man3/initgroups.3:76
145 #. to allocate the group structure, or to allocate buffers
147 #: build/C/man3/fgetgrent.3:92 build/C/man3/getgrent.3:148 build/C/man3/getgrnam.3:203
148 msgid "Insufficient memory to allocate I<group> structure."
152 #: build/C/man3/fgetgrent.3:92 build/C/man3/fgetpwent.3:101 build/C/man3/getgrent.3:166 build/C/man3/getgrent_r.3:116 build/C/man3/getgrnam.3:223 build/C/man3/getgrouplist.3:98 build/C/man3/getpw.3:96 build/C/man3/getpwent.3:165 build/C/man3/getpwent_r.3:118 build/C/man3/getpwnam.3:230 build/C/man3/getspnam.3:249 build/C/man3/initgroups.3:88 build/C/man3/putgrent.3:44 build/C/man3/putpwent.3:82 build/C/man3/setaliasent.3:101
154 msgid "CONFORMING TO"
158 #: build/C/man3/fgetgrent.3:94 build/C/man3/fgetpwent.3:103 build/C/man3/putpwent.3:84
163 #: build/C/man3/fgetgrent.3:94 build/C/man3/fgetpwent.3:103 build/C/man5/ftpusers.5:49 build/C/man3/getgrent.3:168 build/C/man3/getgrent_r.3:183 build/C/man3/getgrnam.3:246 build/C/man3/getgrouplist.3:189 build/C/man3/getpw.3:105 build/C/man3/getpwent.3:170 build/C/man3/getpwent_r.3:180 build/C/man3/getpwnam.3:326 build/C/man3/getspnam.3:253 build/C/man5/group.5:61 build/C/man3/initgroups.3:90 build/C/man5/passwd.5:162 build/C/man3/putgrent.3:46 build/C/man3/putpwent.3:84 build/C/man3/setaliasent.3:145
169 #: build/C/man3/fgetgrent.3:104
171 "B<endgrent>(3), B<fgetgrent_r>(3), B<fopen>(3), B<getgrent>(3), "
172 "B<getgrgid>(3), B<getgrnam>(3), B<putgrent>(3), B<setgrent>(3), B<group>(5)"
176 #: build/C/man3/fgetgrent.3:104 build/C/man3/fgetpwent.3:114 build/C/man5/ftpusers.5:53 build/C/man3/getgrent.3:176 build/C/man3/getgrent_r.3:190 build/C/man3/getgrnam.3:253 build/C/man3/getgrouplist.3:195 build/C/man3/getpw.3:114 build/C/man3/getpwent.3:178 build/C/man3/getpwent_r.3:188 build/C/man3/getpwnam.3:336 build/C/man3/getspnam.3:258 build/C/man5/group.5:67 build/C/man3/initgroups.3:94 build/C/man5/passwd.5:171 build/C/man3/putgrent.3:50 build/C/man3/putpwent.3:92 build/C/man3/setaliasent.3:154
182 #: build/C/man3/fgetgrent.3:111 build/C/man3/fgetpwent.3:121 build/C/man5/ftpusers.5:60 build/C/man3/getgrent.3:183 build/C/man3/getgrent_r.3:197 build/C/man3/getgrnam.3:260 build/C/man3/getgrouplist.3:202 build/C/man3/getpw.3:121 build/C/man3/getpwent.3:185 build/C/man3/getpwent_r.3:195 build/C/man3/getpwnam.3:343 build/C/man3/getspnam.3:265 build/C/man5/group.5:74 build/C/man3/initgroups.3:101 build/C/man5/passwd.5:178 build/C/man3/putgrent.3:57 build/C/man3/putpwent.3:99 build/C/man3/setaliasent.3:161
184 "This page is part of release 3.52 of the Linux I<man-pages> project. A "
185 "description of the project, and information about reporting bugs, can be "
186 "found at \\%http://www.kernel.org/doc/man-pages/."
190 #: build/C/man3/fgetpwent.3:33
196 #: build/C/man3/fgetpwent.3:36
197 msgid "fgetpwent - get password file entry"
201 #: build/C/man3/fgetpwent.3:41 build/C/man3/putpwent.3:38
204 "B<#include E<lt>stdio.hE<gt>>\n"
205 "B<#include E<lt>sys/types.hE<gt>>\n"
206 "B<#include E<lt>pwd.hE<gt>>\n"
210 #: build/C/man3/fgetpwent.3:43
212 msgid "B<struct passwd *fgetpwent(FILE *>I<stream>B<);>\n"
216 #: build/C/man3/fgetpwent.3:52
217 msgid "B<fgetpwent>(): _SVID_SOURCE"
221 #: build/C/man3/fgetpwent.3:65
223 "The B<fgetpwent>() function returns a pointer to a structure containing the "
224 "broken out fields of a line in the file I<stream>. The first time it is "
225 "called it returns the first entry; thereafter, it returns successive "
226 "entries. The file referred to by I<stream> must have the same format as "
227 "I</etc/passwd> (see B<passwd>(5))."
231 #: build/C/man3/fgetpwent.3:67 build/C/man3/getpw.3:55 build/C/man3/getpwent.3:86 build/C/man3/getpwent_r.3:67 build/C/man3/getpwnam.3:90 build/C/man3/putpwent.3:56
232 msgid "The I<passwd> structure is defined in I<E<lt>pwd.hE<gt>> as follows:"
236 #: build/C/man3/fgetpwent.3:79
240 " char *pw_name; /* username */\n"
241 " char *pw_passwd; /* user password */\n"
242 " uid_t pw_uid; /* user ID */\n"
243 " gid_t pw_gid; /* group ID */\n"
244 " char *pw_gecos; /* real name */\n"
245 " char *pw_dir; /* home directory */\n"
246 " char *pw_shell; /* shell program */\n"
251 #: build/C/man3/fgetpwent.3:91
253 "The B<fgetpwent>() function returns a pointer to a I<passwd> structure, or "
254 "NULL if there are no more entries or an error occurs. In the event of an "
255 "error, I<errno> is set to indicate the cause."
259 #. This structure is static, allocated 0 or 1 times. No memory leak. (libc45)
261 #: build/C/man3/fgetpwent.3:97 build/C/man3/getpw.3:92 build/C/man3/getpwent.3:147 build/C/man3/getpwnam.3:210
262 msgid "Insufficient memory to allocate I<passwd> structure."
266 #: build/C/man3/fgetpwent.3:97 build/C/man5/ftpusers.5:47 build/C/man3/getgrent.3:151 build/C/man3/getgrnam.3:206 build/C/man3/getpw.3:92 build/C/man3/getpwent.3:150 build/C/man3/getpwnam.3:213 build/C/man3/getspnam.3:236 build/C/man5/group.5:53 build/C/man3/initgroups.3:84 build/C/man5/passwd.5:142 build/C/man3/setaliasent.3:95
272 #: build/C/man3/fgetpwent.3:98 build/C/man3/getpw.3:93 build/C/man3/getpwent.3:151 build/C/man3/getpwnam.3:214 build/C/man5/passwd.5:144
274 msgid "I</etc/passwd>"
278 #: build/C/man3/fgetpwent.3:101 build/C/man3/getpw.3:96
279 msgid "password database file"
283 #: build/C/man3/fgetpwent.3:114
285 "B<endpwent>(3), B<fgetpwent_r>(3), B<fopen>(3), B<getpw>(3), B<getpwent>(3), "
286 "B<getpwnam>(3), B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
290 #: build/C/man5/ftpusers.5:19
296 #: build/C/man5/ftpusers.5:19
302 #: build/C/man5/ftpusers.5:19 build/C/man5/group.5:26 build/C/man5/passwd.5:30
308 #: build/C/man5/ftpusers.5:22
309 msgid "ftpusers - list of users that may not log in via the FTP daemon"
313 #: build/C/man5/ftpusers.5:41
315 "The text file B<ftpusers> contains a list of users that may not log in using "
316 "the File Transfer Protocol (FTP) server daemon. This file is used not "
317 "merely for system administration purposes but for improving security within "
318 "a TCP/IP networked environment. It will typically contain a list of the "
319 "users that either have no business using ftp or have too many privileges to "
320 "be allowed to log in through the FTP server daemon. Such users usually "
321 "include root, daemon, bin, uucp, and news. If your FTP server daemon "
322 "doesn't use B<ftpusers> then it is suggested that you read its documentation "
323 "to find out how to block access for certain users. Washington University "
324 "FTP server Daemon (wuftpd) and Professional FTP Daemon (proftpd) are known "
325 "to make use of B<ftpusers>."
329 #: build/C/man5/ftpusers.5:41
335 #: build/C/man5/ftpusers.5:47
337 "The format of B<ftpusers> is very simple. There is one account name (or "
338 "username) per line. Lines starting with a # are ignored."
342 #: build/C/man5/ftpusers.5:49
343 msgid "I</etc/ftpusers>"
347 #: build/C/man5/ftpusers.5:53
348 msgid "B<passwd>(5), B<proftpd>(8), B<wuftpd>(8)"
352 #: build/C/man3/getgrent.3:30
358 #: build/C/man3/getgrent.3:30 build/C/man3/getgrnam.3:33 build/C/man3/getpwent.3:33 build/C/man3/getpwnam.3:37
364 #: build/C/man3/getgrent.3:33
365 msgid "getgrent, setgrent, endgrent - get group file entry"
369 #: build/C/man3/getgrent.3:37 build/C/man3/getgrnam.3:40 build/C/man3/initgroups.3:39
372 "B<#include E<lt>sys/types.hE<gt>>\n"
373 "B<#include E<lt>grp.hE<gt>>\n"
377 #: build/C/man3/getgrent.3:39
379 msgid "B<struct group *getgrent(void);>\n"
383 #: build/C/man3/getgrent.3:41
385 msgid "B<void setgrent(void);>\n"
389 #: build/C/man3/getgrent.3:43
391 msgid "B<void endgrent(void);>\n"
395 #: build/C/man3/getgrent.3:53
396 msgid "B<setgrent>():"
400 #: build/C/man3/getgrent.3:56
402 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
403 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED ||"
407 #: build/C/man3/getgrent.3:58
408 msgid "/* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
412 #: build/C/man3/getgrent.3:62
413 msgid "B<getgrent>(), B<endgrent>():"
417 #: build/C/man3/getgrent.3:65
419 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
420 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
424 #: build/C/man3/getgrent.3:80
426 "The B<getgrent>() function returns a pointer to a structure containing the "
427 "broken-out fields of a record in the group database (e.g., the local group "
428 "file I</etc/group>, NIS, and LDAP). The first time B<getgrent>() is "
429 "called, it returns the first entry; thereafter, it returns successive "
434 #: build/C/man3/getgrent.3:85
436 "The B<setgrent>() function rewinds to the beginning of the group database, "
437 "to allow repeated scans."
441 #: build/C/man3/getgrent.3:90
443 "The B<endgrent>() function is used to close the group database after all "
444 "processing has been performed."
448 #: build/C/man3/getgrent.3:101 build/C/man3/getgrnam.3:95
452 " char *gr_name; /* group name */\n"
453 " char *gr_passwd; /* group password */\n"
454 " gid_t gr_gid; /* group ID */\n"
455 " char **gr_mem; /* group members */\n"
460 #: build/C/man3/getgrent.3:106 build/C/man3/getgrent_r.3:82 build/C/man3/getgrnam.3:100
461 msgid "For more information about the fields of this structure, see B<group>(5)."
465 #: build/C/man3/getgrent.3:113
467 "The B<getgrent>() function returns a pointer to a I<group> structure, or "
468 "NULL if there are no more entries or an error occurs."
472 #: build/C/man3/getgrent.3:120
474 "Upon error, I<errno> may be set. If one wants to check I<errno> after the "
475 "call, it should be set to zero before the call."
479 #: build/C/man3/getgrent.3:129
481 "The return value may point to a static area, and may be overwritten by "
482 "subsequent calls to B<getgrent>(), B<getgrgid>(3), or B<getgrnam>(3). (Do "
483 "not pass the returned pointer to B<free>(3).)"
487 #: build/C/man3/getgrent.3:130 build/C/man3/getgrnam.3:182 build/C/man3/getpwent.3:126 build/C/man3/getpwnam.3:189
493 #: build/C/man3/getgrent.3:133 build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:129 build/C/man3/getpwnam.3:192
494 msgid "A signal was caught."
498 #: build/C/man3/getgrent.3:133 build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:129 build/C/man3/getpwnam.3:192
504 #: build/C/man3/getgrent.3:136 build/C/man3/getgrnam.3:188 build/C/man3/getpwent.3:132 build/C/man3/getpwnam.3:195
509 #: build/C/man3/getgrent.3:136 build/C/man3/getgrnam.3:188 build/C/man3/getpwent.3:132 build/C/man3/getpwnam.3:195
515 #: build/C/man3/getgrent.3:139
516 msgid "The calling process already has too many open files."
520 #: build/C/man3/getgrent.3:139 build/C/man3/getgrnam.3:193 build/C/man3/getpwent.3:137 build/C/man3/getpwnam.3:200
526 #: build/C/man3/getgrent.3:142
527 msgid "Too many open files in the system."
531 #: build/C/man3/getgrent.3:148 build/C/man3/getgrent_r.3:112 build/C/man3/getgrnam.3:203 build/C/man3/getpwent.3:147 build/C/man3/getpwent_r.3:114 build/C/man3/getpwnam.3:210 build/C/man3/getspnam.3:233
537 #: build/C/man3/getgrent.3:151 build/C/man3/getgrnam.3:206 build/C/man3/getpwent.3:150 build/C/man3/getpwnam.3:213
538 msgid "Insufficient buffer space supplied."
542 #: build/C/man3/getgrent.3:152 build/C/man3/getgrnam.3:207
544 msgid "I</etc/group>"
548 #: build/C/man3/getgrent.3:155 build/C/man3/getgrnam.3:210
549 msgid "local group database file"
553 #: build/C/man3/getgrent.3:155 build/C/man3/getgrnam.3:210 build/C/man3/getpwent.3:154 build/C/man3/getpwnam.3:217
559 #: build/C/man3/getgrent.3:156 build/C/man3/getgrnam.3:211 build/C/man3/getpwent.3:155 build/C/man3/getpwnam.3:218
561 msgid "Multithreading (see pthreads(7))"
565 #: build/C/man3/getgrent.3:160
566 msgid "The B<getgrent()> function is not thread-safe."
570 #: build/C/man3/getgrent.3:166
571 msgid "The B<setgrent()> and B<endgrent()> functions are thread-safe."
575 #: build/C/man3/getgrent.3:168 build/C/man3/getgrnam.3:225
576 msgid "SVr4, 4.3BSD, POSIX.1-2001."
580 #: build/C/man3/getgrent.3:176
582 "B<fgetgrent>(3), B<getgrent_r>(3), B<getgrgid>(3), B<getgrnam>(3), "
583 "B<getgrouplist>(3), B<putgrent>(3), B<group>(5)"
587 #: build/C/man3/getgrent_r.3:24
593 #: build/C/man3/getgrent_r.3:24 build/C/man3/getpw.3:32 build/C/man3/getpwent_r.3:24 build/C/man5/group.5:26
599 #: build/C/man3/getgrent_r.3:27
600 msgid "getgrent_r, fgetgrent_r - get group file entry reentrantly"
604 #: build/C/man3/getgrent_r.3:30
606 msgid "B<#include E<lt>grp.hE<gt>>\n"
610 #: build/C/man3/getgrent_r.3:32
612 msgid "B<int getgrent_r(struct group *>I<gbuf>B<, char *>I<buf>B<,>\n"
616 #: build/C/man3/getgrent_r.3:34
618 msgid "B< size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
622 #: build/C/man3/getgrent_r.3:36
625 "B<int fgetgrent_r(FILE *>I<fp>B<, struct group *>I<gbuf>B<, char "
630 #: build/C/man3/getgrent_r.3:38
632 msgid "B< size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
635 #. FIXME . The FTM requirements seem inconsistent here. File a glibc bug?
637 #: build/C/man3/getgrent_r.3:48
638 msgid "B<getgrent_r>(): _GNU_SOURCE"
642 #: build/C/man3/getgrent_r.3:51
643 msgid "B<fgetgrent_r>(): _SVID_SOURCE"
647 #: build/C/man3/getgrent_r.3:64
649 "The functions B<getgrent_r>() and B<fgetgrent_r>() are the reentrant "
650 "versions of B<getgrent>(3) and B<fgetgrent>(3). The former reads the next "
651 "group entry from the stream initialized by B<setgrent>(3). The latter reads "
652 "the next group entry from the stream I<fp>."
656 #: build/C/man3/getgrent_r.3:77
660 " char *gr_name; /* group name */\n"
661 " char *gr_passwd; /* group password */\n"
662 " gid_t gr_gid; /* group ID */\n"
663 " char **gr_mem; /* group members */\n"
668 #: build/C/man3/getgrent_r.3:101
670 "The nonreentrant functions return a pointer to static storage, where this "
671 "static storage contains further pointers to group name, password and "
672 "members. The reentrant functions described here return all of that in "
673 "caller-provided buffers. First of all there is the buffer I<gbuf> that can "
674 "hold a I<struct group>. And next the buffer I<buf> of size I<buflen> that "
675 "can hold additional strings. The result of these functions, the I<struct "
676 "group> read from the stream, is stored in the provided buffer I<*gbuf>, and "
677 "a pointer to this I<struct group> is returned in I<*gbufp>."
681 #: build/C/man3/getgrent_r.3:108
683 "On success, these functions return 0 and I<*gbufp> is a pointer to the "
684 "I<struct group>. On error, these functions return an error value and "
689 #: build/C/man3/getgrent_r.3:109 build/C/man3/getpw.3:83 build/C/man3/getpwent_r.3:111
695 #: build/C/man3/getgrent_r.3:112 build/C/man3/getpwent_r.3:114
696 msgid "No more entries."
700 #: build/C/man3/getgrent_r.3:116 build/C/man3/getpwent_r.3:118
701 msgid "Insufficient buffer space supplied. Try again with larger buffer."
705 #: build/C/man3/getgrent_r.3:121 build/C/man3/getpwent_r.3:123
707 "These functions are GNU extensions, done in a style resembling the POSIX "
708 "version of functions like B<getpwnam_r>(3). Other systems use prototype"
712 #: build/C/man3/getgrent_r.3:126
715 "struct group *getgrent_r(struct group *grp, char *buf,\n"
720 #: build/C/man3/getgrent_r.3:130 build/C/man3/getpwent_r.3:132
725 #: build/C/man3/getgrent_r.3:135
728 "int getgrent_r(struct group *grp, char *buf, int buflen,\n"
733 #: build/C/man3/getgrent_r.3:137 build/C/man3/getgrnam.3:225 build/C/man3/getpwent_r.3:140 build/C/man3/getpwnam.3:235 build/C/man5/passwd.5:144
739 #: build/C/man3/getgrent_r.3:142
741 "The function B<getgrent_r>() is not really reentrant since it shares the "
742 "reading position in the stream with all other threads."
746 #: build/C/man3/getgrent_r.3:142 build/C/man3/getgrouplist.3:109 build/C/man3/getpwent_r.3:145 build/C/man3/getpwnam.3:274 build/C/man3/setaliasent.3:115
752 #: build/C/man3/getgrent_r.3:149
755 "#define _GNU_SOURCE\n"
756 "#include E<lt>grp.hE<gt>\n"
757 "#include E<lt>stdio.hE<gt>\n"
758 "#include E<lt>stdlib.hE<gt>\n"
759 "#define BUFLEN 4096\n"
763 #: build/C/man3/getgrent_r.3:156
769 " struct group grp, *grpp;\n"
770 " char buf[BUFLEN];\n"
775 #: build/C/man3/getgrent_r.3:173
780 " i = getgrent_r(&grp, buf, BUFLEN, &grpp);\n"
783 " printf(\"%s (%d):\", grpp-E<gt>gr_name, grpp-E<gt>gr_gid);\n"
784 " for (i = 0; ; i++) {\n"
785 " if (grpp-E<gt>gr_mem[i] == NULL)\n"
787 " printf(\" %s\", grpp-E<gt>gr_mem[i]);\n"
789 " printf(\"\\en\");\n"
792 " exit(EXIT_SUCCESS);\n"
797 #: build/C/man3/getgrent_r.3:190
799 "B<fgetgrent>(3), B<getgrent>(3), B<getgrgid>(3), B<getgrnam>(3), "
800 "B<putgrent>(3), B<group>(5)"
804 #: build/C/man3/getgrnam.3:33
810 #: build/C/man3/getgrnam.3:36
811 msgid "getgrnam, getgrnam_r, getgrgid, getgrgid_r - get group file entry"
815 #: build/C/man3/getgrnam.3:42
817 msgid "B<struct group *getgrnam(const char *>I<name>B<);>\n"
821 #: build/C/man3/getgrnam.3:44
823 msgid "B<struct group *getgrgid(gid_t >I<gid>B<);>\n"
827 #: build/C/man3/getgrnam.3:46
829 msgid "B<int getgrnam_r(const char *>I<name>B<, struct group *>I<grp>B<,>\n"
833 #: build/C/man3/getgrnam.3:48 build/C/man3/getgrnam.3:52
836 "B< char *>I<buf>B<, size_t >I<buflen>B<, struct group "
837 "**>I<result>B<);>\n"
841 #: build/C/man3/getgrnam.3:50
843 msgid "B<int getgrgid_r(gid_t >I<gid>B<, struct group *>I<grp>B<,>\n"
847 #: build/C/man3/getgrnam.3:62
848 msgid "B<getgrnam_r>(), B<getgrgid_r>():"
852 #: build/C/man3/getgrnam.3:65 build/C/man3/getpwnam.3:69
854 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
859 #: build/C/man3/getgrnam.3:77
861 "The B<getgrnam>() function returns a pointer to a structure containing the "
862 "broken-out fields of the record in the group database (e.g., the local group "
863 "file I</etc/group>, NIS, and LDAP) that matches the group name I<name>."
867 #: build/C/man3/getgrnam.3:84
869 "The B<getgrgid>() function returns a pointer to a structure containing the "
870 "broken-out fields of the record in the group database that matches the group "
875 #: build/C/man3/getgrnam.3:123
877 "The B<getgrnam_r>() and B<getgrgid_r>() functions obtain the same "
878 "information as B<getgrnam>() and B<getgrgid>(), but store the retrieved "
879 "I<group> structure in the space pointed to by I<grp>. The string fields "
880 "pointed to by the members of the I<group> structure are stored in the buffer "
881 "I<buf> of size I<buflen>. A pointer to the result (in case of success) or "
882 "NULL (in case no entry was found or an error occurred) is stored in "
887 #: build/C/man3/getgrnam.3:125 build/C/man3/getpwnam.3:132
892 #: build/C/man3/getgrnam.3:127
894 msgid " sysconf(_SC_GETGR_R_SIZE_MAX)\n"
898 #: build/C/man3/getgrnam.3:136 build/C/man3/getpwnam.3:143
900 "returns either -1, without changing I<errno>, or an initial suggested size "
901 "for I<buf>. (If this size is too small, the call fails with B<ERANGE>, in "
902 "which case the caller can retry with a larger buffer.)"
906 #: build/C/man3/getgrnam.3:151
908 "The B<getgrnam>() and B<getgrgid>() functions return a pointer to a "
909 "I<group> structure, or NULL if the matching entry is not found or an error "
910 "occurs. If an error occurs, I<errno> is set appropriately. If one wants to "
911 "check I<errno> after the call, it should be set to zero before the call."
915 #: build/C/man3/getgrnam.3:160
917 "The return value may point to a static area, and may be overwritten by "
918 "subsequent calls to B<getgrent>(3), B<getgrgid>(), or B<getgrnam>(). (Do "
919 "not pass the returned pointer to B<free>(3).)"
923 #: build/C/man3/getgrnam.3:174
925 "On success, B<getgrnam_r>() and B<getgrgid_r>() return zero, and set "
926 "I<*result> to I<grp>. If no matching group record was found, these "
927 "functions return 0 and store NULL in I<*result>. In case of error, an error "
928 "number is returned, and NULL is stored in I<*result>."
932 #: build/C/man3/getgrnam.3:175 build/C/man3/getpwnam.3:182
934 msgid "B<0> or B<ENOENT> or B<ESRCH> or B<EBADF> or B<EPERM> or ... "
938 #: build/C/man3/getgrnam.3:182
939 msgid "The given I<name> or I<gid> was not found."
943 #: build/C/man3/getgrnam.3:193 build/C/man3/getpwent.3:137 build/C/man3/getpwnam.3:200
945 "The maximum number (B<OPEN_MAX>) of files was open already in the calling "
950 #: build/C/man3/getgrnam.3:196 build/C/man3/getpwent.3:140 build/C/man3/getpwnam.3:203
951 msgid "The maximum number of files was open already in the system."
955 #: build/C/man3/getgrnam.3:217
956 msgid "The functions B<getgrnam>() and B<getgrgid>() are not thread-safe."
960 #: build/C/man3/getgrnam.3:223
961 msgid "The functions B<getgrnam_r>() and B<getgrgid_r>() are thread-safe."
965 #. AIX 5.1 - gives ESRCH
966 #. OSF1 4.0g - gives EWOULDBLOCK
967 #. libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
968 #. glibc since version 2.7 - give 0
969 #. FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
970 #. SunOS 5.8 - gives EBADF
971 #. Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
973 #: build/C/man3/getgrnam.3:246
975 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001. It "
976 "does not call \"not found\" an error, hence does not specify what value "
977 "I<errno> might have in this situation. But that makes it impossible to "
978 "recognize errors. One might argue that according to POSIX I<errno> should "
979 "be left unchanged if an entry is not found. Experiments on various "
980 "UNIX-like systems shows that lots of different values occur in this "
981 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
985 #: build/C/man3/getgrnam.3:253
987 "B<endgrent>(3), B<fgetgrent>(3), B<getgrent>(3), B<getpwnam>(3), "
988 "B<setgrent>(3), B<group>(5)"
992 #: build/C/man3/getgrouplist.3:29
998 #: build/C/man3/getgrouplist.3:29
1004 #: build/C/man3/getgrouplist.3:32
1005 msgid "getgrouplist - get list of groups to which a user belongs"
1009 #: build/C/man3/getgrouplist.3:34 build/C/man3/putgrent.3:14
1010 msgid "B<#include E<lt>grp.hE<gt>>"
1014 #: build/C/man3/getgrouplist.3:36
1015 msgid "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>"
1019 #: build/C/man3/getgrouplist.3:38
1020 msgid "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>"
1024 #: build/C/man3/getgrouplist.3:46
1025 msgid "B<getgrouplist>(): _BSD_SOURCE"
1029 #: build/C/man3/getgrouplist.3:58
1031 "The B<getgrouplist>() function scans the group database (see B<group>(5)) "
1032 "to obtain the list of groups that I<user> belongs to. Up to I<*ngroups> of "
1033 "these groups are returned in the array I<groups>."
1037 #: build/C/man3/getgrouplist.3:68
1039 "If it was not among the groups defined for I<user> in the group database, "
1040 "then I<group> is included in the list of groups returned by "
1041 "B<getgrouplist>(); typically this argument is specified as the group ID from "
1042 "the password record for I<user>."
1046 #: build/C/man3/getgrouplist.3:78
1048 "The I<ngroups> argument is a value-result argument: on return it always "
1049 "contains the number of groups found for I<user>, including I<group>; this "
1050 "value may be greater than the number of groups stored in I<groups>."
1054 #: build/C/man3/getgrouplist.3:86
1056 "If the number of groups of which I<user> is a member is less than or equal "
1057 "to I<*ngroups>, then the value I<*ngroups> is returned."
1061 #: build/C/man3/getgrouplist.3:96
1063 "If the user is a member of more than I<*ngroups> groups, then "
1064 "B<getgrouplist>() returns -1. In this case the value returned in "
1065 "I<*ngroups> can be used to resize the buffer passed to a further call "
1066 "B<getgrouplist>()."
1070 #: build/C/man3/getgrouplist.3:96
1076 #: build/C/man3/getgrouplist.3:98
1077 msgid "This function is present since glibc 2.2.4."
1081 #: build/C/man3/getgrouplist.3:100
1082 msgid "This function is nonstandard; it appears on most BSDs."
1086 #: build/C/man3/getgrouplist.3:100 build/C/man3/getpw.3:98 build/C/man5/group.5:55
1092 #: build/C/man3/getgrouplist.3:109
1094 "In glibc versions before 2.3.3, the implementation of this function contains "
1095 "a buffer-overrun bug: it returns the complete list of groups for I<user> in "
1096 "the array I<groups>, even when the number of groups exceeds I<*ngroups>."
1100 #: build/C/man3/getgrouplist.3:118
1102 "The program below displays the group list for the user named in its first "
1103 "command-line argument. The second command-line argument specifies the "
1104 "I<ngroups> value to be supplied to B<getgrouplist>(). The following shell "
1105 "session shows examples of the use of this program:"
1109 #: build/C/man3/getgrouplist.3:128
1112 "$B< ./a.out cecilia 0>\n"
1113 "getgrouplist() returned -1; ngroups = 3\n"
1114 "$B< ./a.out cecilia 3>\n"
1122 #: build/C/man3/getgrouplist.3:130
1124 msgid "Program source"
1128 #: build/C/man3/getgrouplist.3:137
1131 "#include E<lt>stdio.hE<gt>\n"
1132 "#include E<lt>stdlib.hE<gt>\n"
1133 "#include E<lt>grp.hE<gt>\n"
1134 "#include E<lt>pwd.hE<gt>\n"
1138 #: build/C/man3/getgrouplist.3:145
1142 "main(int argc, char *argv[])\n"
1144 " int j, ngroups;\n"
1146 " struct passwd *pw;\n"
1147 " struct group *gr;\n"
1151 #: build/C/man3/getgrouplist.3:150
1154 " if (argc != 3) {\n"
1155 " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", "
1157 " exit(EXIT_FAILURE);\n"
1162 #: build/C/man3/getgrouplist.3:152
1164 msgid " ngroups = atoi(argv[2]);\n"
1168 #: build/C/man3/getgrouplist.3:158
1171 " groups = malloc(ngroups * sizeof (gid_t));\n"
1172 " if (groups == NULL) {\n"
1173 " perror(\"malloc\");\n"
1174 " exit(EXIT_FAILURE);\n"
1179 #: build/C/man3/getgrouplist.3:160
1181 msgid " /* Fetch passwd structure (contains first group ID for user) */\n"
1185 #: build/C/man3/getgrouplist.3:166
1188 " pw = getpwnam(argv[1]);\n"
1189 " if (pw == NULL) {\n"
1190 " perror(\"getpwnam\");\n"
1191 " exit(EXIT_SUCCESS);\n"
1196 #: build/C/man3/getgrouplist.3:168
1198 msgid " /* Retrieve group list */\n"
1202 #: build/C/man3/getgrouplist.3:174
1205 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
1206 " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\en\",\n"
1208 "\texit(EXIT_FAILURE);\n"
1213 #: build/C/man3/getgrouplist.3:176
1215 msgid " /* Display list of retrieved groups, along with group names */\n"
1219 #: build/C/man3/getgrouplist.3:185
1222 " fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
1223 " for (j = 0; j E<lt> ngroups; j++) {\n"
1224 " printf(\"%d\", groups[j]);\n"
1225 " gr = getgrgid(groups[j]);\n"
1226 " if (gr != NULL)\n"
1227 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
1228 " printf(\"\\en\");\n"
1233 #: build/C/man3/getgrouplist.3:188
1236 " exit(EXIT_SUCCESS);\n"
1241 #: build/C/man3/getgrouplist.3:195
1242 msgid "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group>(5), B<passwd>(5)"
1246 #: build/C/man3/getpw.3:32
1252 #: build/C/man3/getpw.3:35
1253 msgid "getpw - reconstruct password line entry"
1257 #: build/C/man3/getpw.3:40
1260 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
1261 "B<#include E<lt>sys/types.hE<gt>>\n"
1262 "B<#include E<lt>pwd.hE<gt>>\n"
1266 #: build/C/man3/getpw.3:42
1268 msgid "B<int getpw(uid_t >I<uid>B<, char *>I<buf>B<);>\n"
1272 #: build/C/man3/getpw.3:49
1274 "The B<getpw>() function reconstructs the password line entry for the given "
1275 "user ID I<uid> in the buffer I<buf>. The returned buffer contains a line of "
1280 #: build/C/man3/getpw.3:52
1281 msgid "B<name:passwd:uid:gid:gecos:dir:shell>"
1285 #: build/C/man3/getpw.3:67 build/C/man3/getpwent.3:98 build/C/man3/getpwnam.3:102
1289 " char *pw_name; /* username */\n"
1290 " char *pw_passwd; /* user password */\n"
1291 " uid_t pw_uid; /* user ID */\n"
1292 " gid_t pw_gid; /* group ID */\n"
1293 " char *pw_gecos; /* user information */\n"
1294 " char *pw_dir; /* home directory */\n"
1295 " char *pw_shell; /* shell program */\n"
1300 #: build/C/man3/getpw.3:72 build/C/man3/getpwent.3:103 build/C/man3/getpwent_r.3:84
1301 msgid "For more information about the fields of this structure, see B<passwd>(5)."
1305 #: build/C/man3/getpw.3:78
1307 "The B<getpw>() function returns 0 on success; on error, it returns -1, and "
1308 "I<errno> is set to indicate the error."
1312 #: build/C/man3/getpw.3:79 build/C/man3/putpwent.3:79
1318 #: build/C/man3/getpw.3:83
1319 msgid "I<buf> is NULL."
1323 #: build/C/man3/getpw.3:87
1324 msgid "No user corresponding to I<uid>."
1328 #: build/C/man3/getpw.3:98
1333 #: build/C/man3/getpw.3:105
1335 "The B<getpw>() function is dangerous as it may overflow the provided buffer "
1336 "I<buf>. It is obsoleted by B<getpwuid>(3)."
1340 #: build/C/man3/getpw.3:114
1342 "B<endpwent>(3), B<fgetpwent>(3), B<getpwent>(3), B<getpwnam>(3), "
1343 "B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1347 #: build/C/man3/getpwent.3:33
1353 #: build/C/man3/getpwent.3:36
1354 msgid "getpwent, setpwent, endpwent - get password file entry"
1358 #: build/C/man3/getpwent.3:40 build/C/man3/getpwnam.3:44
1361 "B<#include E<lt>sys/types.hE<gt>>\n"
1362 "B<#include E<lt>pwd.hE<gt>>\n"
1366 #: build/C/man3/getpwent.3:42
1368 msgid "B<struct passwd *getpwent(void);>\n"
1372 #: build/C/man3/getpwent.3:44
1374 msgid "B<void setpwent(void);>\n"
1378 #: build/C/man3/getpwent.3:46
1380 msgid "B<void endpwent(void);>\n"
1384 #: build/C/man3/getpwent.3:57
1385 msgid "B<getpwent>(), B<setpwent>(), B<endpwent>():"
1389 #: build/C/man3/getpwent.3:60
1391 "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
1392 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
1396 #: build/C/man3/getpwent.3:74
1398 "The B<getpwent>() function returns a pointer to a structure containing the "
1399 "broken-out fields of a record from the password database (e.g., the local "
1400 "password file I</etc/passwd>, NIS, and LDAP). The first time B<getpwent>() "
1401 "is called, it returns the first entry; thereafter, it returns successive "
1406 #: build/C/man3/getpwent.3:79
1408 "The B<setpwent>() function rewinds to the beginning of the password "
1413 #: build/C/man3/getpwent.3:84
1415 "The B<endpwent>() function is used to close the password database after all "
1416 "processing has been performed."
1420 #: build/C/man3/getpwent.3:116
1422 "The B<getpwent>() function returns a pointer to a I<passwd> structure, or "
1423 "NULL if there are no more entries or an error occurs. If an error occurs, "
1424 "I<errno> is set appropriately. If one wants to check I<errno> after the "
1425 "call, it should be set to zero before the call."
1429 #: build/C/man3/getpwent.3:125
1431 "The return value may point to a static area, and may be overwritten by "
1432 "subsequent calls to B<getpwent>(), B<getpwnam>(3), or B<getpwuid>(3). (Do "
1433 "not pass the returned pointer to B<free>(3).)"
1437 #: build/C/man3/getpwent.3:154 build/C/man3/getpwnam.3:217
1438 msgid "local password database file"
1442 #: build/C/man3/getpwent.3:159
1443 msgid "The B<getpwent()> function is not thread-safe."
1447 #: build/C/man3/getpwent.3:165
1448 msgid "The B<setpwent()> and B<endpwent()> functions are thread-safe."
1452 #: build/C/man3/getpwent.3:170 build/C/man3/getpwnam.3:235
1454 "SVr4, 4.3BSD, POSIX.1-2001. The I<pw_gecos> field is not specified in "
1455 "POSIX, but is present on most implementations."
1459 #: build/C/man3/getpwent.3:178
1461 "B<fgetpwent>(3), B<getpw>(3), B<getpwent_r>(3), B<getpwnam>(3), "
1462 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1466 #: build/C/man3/getpwent_r.3:24
1472 #: build/C/man3/getpwent_r.3:27
1473 msgid "getpwent_r, fgetpwent_r - get passwd file entry reentrantly"
1477 #: build/C/man3/getpwent_r.3:30
1479 msgid "B<#include E<lt>pwd.hE<gt>>\n"
1483 #: build/C/man3/getpwent_r.3:32
1485 msgid "B<int getpwent_r(struct passwd *>I<pwbuf>B<, char *>I<buf>B<,>\n"
1489 #: build/C/man3/getpwent_r.3:34
1491 msgid "B< size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1495 #: build/C/man3/getpwent_r.3:36
1498 "B<int fgetpwent_r(FILE *>I<fp>B<, struct passwd *>I<pwbuf>B<, char "
1503 #: build/C/man3/getpwent_r.3:38
1505 msgid "B< size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1509 #: build/C/man3/getpwent_r.3:47
1510 msgid "B<getpwent_r>(), _BSD_SOURCE || _SVID_SOURCE"
1514 #: build/C/man3/getpwent_r.3:50
1515 msgid "B<fgetpwent_r>(): _SVID_SOURCE"
1519 #: build/C/man3/getpwent_r.3:63
1521 "The functions B<getpwent_r>() and B<fgetpwent_r>() are the reentrant "
1522 "versions of B<getpwent>(3) and B<fgetpwent>(3). The former reads the next "
1523 "passwd entry from the stream initialized by B<setpwent>(3). The latter "
1524 "reads the next passwd entry from the stream I<fp>."
1528 #: build/C/man3/getpwent_r.3:79
1532 " char *pw_name; /* username */\n"
1533 " char *pw_passwd; /* user password */\n"
1534 " uid_t pw_uid; /* user ID */\n"
1535 " gid_t pw_gid; /* group ID */\n"
1536 " char *pw_gecos; /* user information */\n"
1537 " char *pw_dir; /* home directory */\n"
1538 " char *pw_shell; /* shell program */\n"
1543 #: build/C/man3/getpwent_r.3:103
1545 "The nonreentrant functions return a pointer to static storage, where this "
1546 "static storage contains further pointers to user name, password, gecos "
1547 "field, home directory and shell. The reentrant functions described here "
1548 "return all of that in caller-provided buffers. First of all there is the "
1549 "buffer I<pwbuf> that can hold a I<struct passwd>. And next the buffer "
1550 "I<buf> of size I<buflen> that can hold additional strings. The result of "
1551 "these functions, the I<struct passwd> read from the stream, is stored in the "
1552 "provided buffer I<*pwbuf>, and a pointer to this I<struct passwd> is "
1553 "returned in I<*pwbufp>."
1557 #: build/C/man3/getpwent_r.3:110
1559 "On success, these functions return 0 and I<*pwbufp> is a pointer to the "
1560 "I<struct passwd>. On error, these functions return an error value and "
1561 "I<*pwbufp> is NULL."
1565 #: build/C/man3/getpwent_r.3:128
1569 "getpwent_r(struct passwd *pwd, char *buf, int buflen);\n"
1573 #: build/C/man3/getpwent_r.3:138
1577 "getpwent_r(struct passwd *pwd, char *buf, int buflen,\n"
1582 #: build/C/man3/getpwent_r.3:145
1584 "The function B<getpwent_r>() is not really reentrant since it shares the "
1585 "reading position in the stream with all other threads."
1589 #: build/C/man3/getpwent_r.3:151
1592 "#define _GNU_SOURCE\n"
1593 "#include E<lt>pwd.hE<gt>\n"
1594 "#include E<lt>stdio.hE<gt>\n"
1595 "#define BUFLEN 4096\n"
1599 #: build/C/man3/getpwent_r.3:158
1605 " struct passwd pw, *pwp;\n"
1606 " char buf[BUFLEN];\n"
1611 #: build/C/man3/getpwent_r.3:170
1616 " i = getpwent_r(&pw, buf, BUFLEN, &pwp);\n"
1619 " printf(\"%s (%d)\\etHOME %s\\etSHELL %s\\en\", pwp-E<gt>pw_name,\n"
1620 " pwp-E<gt>pw_uid, pwp-E<gt>pw_dir, pwp-E<gt>pw_shell);\n"
1623 " exit(EXIT_SUCCESS);\n"
1628 #: build/C/man3/getpwent_r.3:188
1630 "B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), B<getpwnam>(3), "
1631 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1635 #: build/C/man3/getpwnam.3:37
1641 #: build/C/man3/getpwnam.3:40
1642 msgid "getpwnam, getpwnam_r, getpwuid, getpwuid_r - get password file entry"
1646 #: build/C/man3/getpwnam.3:46
1648 msgid "B<struct passwd *getpwnam(const char *>I<name>B<);>\n"
1652 #: build/C/man3/getpwnam.3:48
1654 msgid "B<struct passwd *getpwuid(uid_t >I<uid>B<);>\n"
1658 #: build/C/man3/getpwnam.3:50
1660 msgid "B<int getpwnam_r(const char *>I<name>B<, struct passwd *>I<pwd>B<,>\n"
1664 #: build/C/man3/getpwnam.3:52 build/C/man3/getpwnam.3:56
1667 "B< char *>I<buf>B<, size_t >I<buflen>B<, struct passwd "
1668 "**>I<result>B<);>\n"
1672 #: build/C/man3/getpwnam.3:54
1674 msgid "B<int getpwuid_r(uid_t >I<uid>B<, struct passwd *>I<pwd>B<,>\n"
1678 #: build/C/man3/getpwnam.3:66
1679 msgid "B<getpwnam_r>(), B<getpwuid_r>():"
1683 #: build/C/man3/getpwnam.3:81
1685 "The B<getpwnam>() function returns a pointer to a structure containing the "
1686 "broken-out fields of the record in the password database (e.g., the local "
1687 "password file I</etc/passwd>, NIS, and LDAP) that matches the username "
1692 #: build/C/man3/getpwnam.3:88
1694 "The B<getpwuid>() function returns a pointer to a structure containing the "
1695 "broken-out fields of the record in the password database that matches the "
1700 #: build/C/man3/getpwnam.3:108
1701 msgid "See B<passwd>(5) for more information about these fields."
1705 #: build/C/man3/getpwnam.3:130
1707 "The B<getpwnam_r>() and B<getpwuid_r>() functions obtain the same "
1708 "information as B<getpwnam>() and B<getpwuid>(), but store the retrieved "
1709 "I<passwd> structure in the space pointed to by I<pwd>. The string fields "
1710 "pointed to by the members of the I<passwd> structure are stored in the "
1711 "buffer I<buf> of size I<buflen>. A pointer to the result (in case of "
1712 "success) or NULL (in case no entry was found or an error occurred) is stored "
1717 #: build/C/man3/getpwnam.3:134
1719 msgid " sysconf(_SC_GETPW_R_SIZE_MAX)\n"
1723 #: build/C/man3/getpwnam.3:158
1725 "The B<getpwnam>() and B<getpwuid>() functions return a pointer to a "
1726 "I<passwd> structure, or NULL if the matching entry is not found or an error "
1727 "occurs. If an error occurs, I<errno> is set appropriately. If one wants to "
1728 "check I<errno> after the call, it should be set to zero before the call."
1732 #: build/C/man3/getpwnam.3:167
1734 "The return value may point to a static area, and may be overwritten by "
1735 "subsequent calls to B<getpwent>(3), B<getpwnam>(), or B<getpwuid>(). (Do "
1736 "not pass the returned pointer to B<free>(3).)"
1740 #: build/C/man3/getpwnam.3:181
1742 "On success, B<getpwnam_r>() and B<getpwuid_r>() return zero, and set "
1743 "I<*result> to I<pwd>. If no matching password record was found, these "
1744 "functions return 0 and store NULL in I<*result>. In case of error, an error "
1745 "number is returned, and NULL is stored in I<*result>."
1749 #: build/C/man3/getpwnam.3:189
1750 msgid "The given I<name> or I<uid> was not found."
1754 #: build/C/man3/getpwnam.3:224
1755 msgid "The functions B<getpwnam>() and B<getpwuid>() are not thread_safe."
1759 #: build/C/man3/getpwnam.3:230
1760 msgid "The functions B<getpwnam_r>() and B<getpwuid_r>() are thread-safe."
1764 #. AIX 5.1 - gives ESRCH
1765 #. OSF1 4.0g - gives EWOULDBLOCK
1766 #. libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
1767 #. glibc since version 2.7 - give 0
1768 #. FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
1769 #. SunOS 5.8 - gives EBADF
1770 #. Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
1772 #: build/C/man3/getpwnam.3:256
1774 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001. It "
1775 "does not call \"not found\" an error, and hence does not specify what value "
1776 "I<errno> might have in this situation. But that makes it impossible to "
1777 "recognize errors. One might argue that according to POSIX I<errno> should "
1778 "be left unchanged if an entry is not found. Experiments on various "
1779 "UNIX-like systems show that lots of different values occur in this "
1780 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
1784 #: build/C/man3/getpwnam.3:274
1786 "The I<pw_dir> field contains the name of the initial working directory of "
1787 "the user. Login programs use the value of this field to initialize the "
1788 "B<HOME> environment variable for the login shell. An application that wants "
1789 "to determine its user's home directory should inspect the value of B<HOME> "
1790 "(rather than the value I<getpwuid(getuid())-E<gt>pw_dir>) since this allows "
1791 "the user to modify their notion of \"the home directory\" during a login "
1792 "session. To determine the (initial) home directory of another user, it is "
1793 "necessary to use I<getpwnam(\"username\")-E<gt>pw_dir> or similar."
1797 #: build/C/man3/getpwnam.3:279
1799 "The program below demonstrates the use of B<getpwnam_r>() to find the full "
1800 "username and user ID for the username supplied as a command-line argument."
1804 #: build/C/man3/getpwnam.3:286
1807 "#include E<lt>pwd.hE<gt>\n"
1808 "#include E<lt>stdio.hE<gt>\n"
1809 "#include E<lt>stdlib.hE<gt>\n"
1810 "#include E<lt>unistd.hE<gt>\n"
1811 "#include E<lt>errno.hE<gt>\n"
1815 #: build/C/man3/getpwnam.3:295
1819 "main(int argc, char *argv[])\n"
1821 " struct passwd pwd;\n"
1822 " struct passwd *result;\n"
1824 " size_t bufsize;\n"
1829 #: build/C/man3/getpwnam.3:300
1832 " if (argc != 2) {\n"
1833 " fprintf(stderr, \"Usage: %s username\\en\", argv[0]);\n"
1834 " exit(EXIT_FAILURE);\n"
1839 #: build/C/man3/getpwnam.3:304
1842 " bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);\n"
1843 " if (bufsize == -1) /* Value was indeterminate */\n"
1844 " bufsize = 16384; /* Should be more than enough */\n"
1848 #: build/C/man3/getpwnam.3:310
1851 " buf = malloc(bufsize);\n"
1852 " if (buf == NULL) {\n"
1853 " perror(\"malloc\");\n"
1854 " exit(EXIT_FAILURE);\n"
1859 #: build/C/man3/getpwnam.3:321
1862 " s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);\n"
1863 " if (result == NULL) {\n"
1865 " printf(\"Not found\\en\");\n"
1868 " perror(\"getpwnam_r\");\n"
1870 " exit(EXIT_FAILURE);\n"
1875 #: build/C/man3/getpwnam.3:325
1878 " printf(\"Name: %s; UID: %ld\\en\", pwd.pw_gecos, (long) pwd.pw_uid);\n"
1879 " exit(EXIT_SUCCESS);\n"
1884 #: build/C/man3/getpwnam.3:336
1886 "B<endpwent>(3), B<fgetpwent>(3), B<getgrnam>(3), B<getpw>(3), "
1887 "B<getpwent>(3), B<getspnam>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1891 #: build/C/man3/getspnam.3:8
1897 #: build/C/man3/getspnam.3:13
1899 "getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, fgetspent, "
1900 "fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf - get "
1901 "shadow password file entry"
1905 #: build/C/man3/getspnam.3:16
1907 msgid "/* General shadow password file API */\n"
1911 #: build/C/man3/getspnam.3:18 build/C/man3/getspnam.3:40
1913 msgid "B<#include E<lt>shadow.hE<gt>>\n"
1917 #: build/C/man3/getspnam.3:20
1919 msgid "B<struct spwd *getspnam(const char *>I<name>B<);>\n"
1923 #: build/C/man3/getspnam.3:22
1925 msgid "B<struct spwd *getspent(void);>\n"
1929 #: build/C/man3/getspnam.3:24
1931 msgid "B<void setspent(void);>\n"
1935 #: build/C/man3/getspnam.3:26
1937 msgid "B<void endspent(void);>\n"
1941 #: build/C/man3/getspnam.3:28
1943 msgid "B<struct spwd *fgetspent(FILE *>I<fp>B<);>\n"
1947 #: build/C/man3/getspnam.3:30
1949 msgid "B<struct spwd *sgetspent(const char *>I<s>B<);>\n"
1953 #: build/C/man3/getspnam.3:32
1955 msgid "B<int putspent(struct spwd *>I<p>B<, FILE *>I<fp>B<);>\n"
1959 #: build/C/man3/getspnam.3:34
1961 msgid "B<int lckpwdf(void);>\n"
1965 #: build/C/man3/getspnam.3:36
1967 msgid "B<int ulckpwdf(void);>\n"
1971 #: build/C/man3/getspnam.3:38
1973 msgid "/* GNU extension */\n"
1977 #: build/C/man3/getspnam.3:42
1979 msgid "B<int getspent_r(struct spwd *>I<spbuf>B<,>\n"
1983 #: build/C/man3/getspnam.3:44 build/C/man3/getspnam.3:48 build/C/man3/getspnam.3:52 build/C/man3/getspnam.3:56
1986 "B< char *>I<buf>B<, size_t >I<buflen>B<, struct spwd "
1987 "**>I<spbufp>B<);>\n"
1991 #: build/C/man3/getspnam.3:46
1993 msgid "B<int getspnam_r(const char *>I<name>B<, struct spwd *>I<spbuf>B<,>\n"
1997 #: build/C/man3/getspnam.3:50
1999 msgid "B<int fgetspent_r(FILE *>I<fp>B<, struct spwd *>I<spbuf>B<,>\n"
2003 #: build/C/man3/getspnam.3:54
2005 msgid "B<int sgetspent_r(const char *>I<s>B<, struct spwd *>I<spbuf>B<,>\n"
2009 #: build/C/man3/getspnam.3:68
2010 msgid "B<getspent_r>(), B<getspnam_r>(), B<fgetspent_r>(), B<sgetspent_r>():"
2014 #: build/C/man3/getspnam.3:70
2015 msgid "_BSD_SOURCE || _SVID_SOURCE"
2019 #: build/C/man3/getspnam.3:84
2021 "Long ago it was considered safe to have encrypted passwords openly visible "
2022 "in the password file. When computers got faster and people got more "
2023 "security-conscious, this was no longer acceptable. Julianne Frances Haugh "
2024 "implemented the shadow password suite that keeps the encrypted passwords in "
2025 "the shadow password database (e.g., the local shadow password file "
2026 "I</etc/shadow>, NIS, and LDAP), readable only by root."
2029 #. FIXME I've commented out the following for the
2030 #. moment. The relationship between PAM and nsswitch.conf needs
2031 #. to be clearly documented in one place, which is pointed to by
2032 #. the pages for the user, group, and shadow password functions.
2035 #. This shadow password setup has been superseded by PAM
2036 #. (pluggable authentication modules), and the file
2037 #. .I /etc/nsswitch.conf
2038 #. now describes the sources to be used.
2040 #: build/C/man3/getspnam.3:101
2042 "The functions described below resemble those for the traditional password "
2043 "database (e.g., see B<getpwnam>(3) and B<getpwent>(3))."
2047 #: build/C/man3/getspnam.3:108
2049 "The B<getspnam>() function returns a pointer to a structure containing the "
2050 "broken-out fields of the record in the shadow password database that matches "
2051 "the username I<name>."
2054 #. some systems require a call of setspent() before the first getspent()
2057 #: build/C/man3/getspnam.3:120
2059 "The B<getspent>() function returns a pointer to the next entry in the "
2060 "shadow password database. The position in the input stream is initialized "
2061 "by B<setspent>(). When done reading, the program may call B<endspent>() so "
2062 "that resources can be deallocated."
2066 #: build/C/man3/getspnam.3:127
2068 "The B<fgetspent>() function is similar to B<getspent>() but uses the "
2069 "supplied stream instead of the one implicitly opened by B<setspent>()."
2073 #: build/C/man3/getspnam.3:134
2075 "The B<sgetspent>() function parses the supplied string I<s> into a struct "
2080 #: build/C/man3/getspnam.3:144
2082 "The B<putspent>() function writes the contents of the supplied struct "
2083 "I<spwd> I<*p> as a text line in the shadow password file format to the "
2084 "stream I<fp>. String entries with value NULL and numerical entries with "
2085 "value -1 are written as an empty string."
2089 #: build/C/man3/getspnam.3:159
2091 "The B<lckpwdf>() function is intended to protect against multiple "
2092 "simultaneous accesses of the shadow password database. It tries to acquire "
2093 "a lock, and returns 0 on success, or -1 on failure (lock not obtained within "
2094 "15 seconds). The B<ulckpwdf>() function releases the lock again. Note "
2095 "that there is no protection against direct access of the shadow password "
2096 "file. Only programs that use B<lckpwdf>() will notice the lock."
2100 #. SUN doesn't have sgetspent()
2102 #: build/C/man3/getspnam.3:164
2104 "These were the functions that formed the original shadow API. They are "
2109 #: build/C/man3/getspnam.3:164
2111 msgid "Reentrant versions"
2115 #: build/C/man3/getspnam.3:181
2117 "Analogous to the reentrant functions for the password database, glibc also "
2118 "has reentrant functions for the shadow password database. The "
2119 "B<getspnam_r>() function is like B<getspnam>() but stores the retrieved "
2120 "shadow password structure in the space pointed to by I<spbuf>. This shadow "
2121 "password structure contains pointers to strings, and these strings are "
2122 "stored in the buffer I<buf> of size I<buflen>. A pointer to the result (in "
2123 "case of success) or NULL (in case no entry was found or an error occurred) "
2124 "is stored in I<*spbufp>."
2128 #: build/C/man3/getspnam.3:188
2130 "The functions B<getspent_r>(), B<fgetspent_r>(), and B<sgetspent_r>() are "
2131 "similarly analogous to their nonreentrant counterparts."
2134 #. SUN doesn't have sgetspent_r()
2136 #: build/C/man3/getspnam.3:192
2138 "Some non-glibc systems also have functions with these names, often with "
2139 "different prototypes."
2143 #: build/C/man3/getspnam.3:192
2149 #: build/C/man3/getspnam.3:194
2151 "The shadow password structure is defined in I<E<lt>shadow.hE<gt>> as "
2156 #: build/C/man3/getspnam.3:214
2160 " char *sp_namp; /* Login name */\n"
2161 " char *sp_pwdp; /* Encrypted password */\n"
2162 " long sp_lstchg; /* Date of last change\n"
2163 " (measured in days since\n"
2164 " 1970-01-01 00:00:00 +0000 (UTC)) */\n"
2165 " long sp_min; /* Min # of days between changes */\n"
2166 " long sp_max; /* Max # of days between changes */\n"
2167 " long sp_warn; /* # of days before password expires\n"
2168 " to warn user to change it */\n"
2169 " long sp_inact; /* # of days after password expires\n"
2170 " until account is disabled */\n"
2171 " long sp_expire; /* Date when account expires\n"
2172 " (measured in days since\n"
2173 " 1970-01-01 00:00:00 +0000 (UTC)) */\n"
2174 " unsigned long sp_flag; /* Reserved */\n"
2179 #: build/C/man3/getspnam.3:223
2181 "The functions that return a pointer return NULL if no more entries are "
2182 "available or if an error occurs during processing. The functions which have "
2183 "I<int> as the return value return 0 for success and -1 for failure, with "
2184 "I<errno> set to indicate the cause of the error."
2188 #: build/C/man3/getspnam.3:226
2190 "For the nonreentrant functions, the return value may point to static area, "
2191 "and may be overwritten by subsequent calls to these functions."
2195 #: build/C/man3/getspnam.3:229
2197 "The reentrant functions return zero on success. In case of error, an error "
2198 "number is returned."
2202 #: build/C/man3/getspnam.3:230
2208 #: build/C/man3/getspnam.3:233
2209 msgid "The caller does not have permission to access the shadow password file."
2213 #: build/C/man3/getspnam.3:236
2214 msgid "Supplied buffer is too small."
2218 #: build/C/man3/getspnam.3:237
2220 msgid "I</etc/shadow>"
2224 #: build/C/man3/getspnam.3:240
2225 msgid "local shadow password database file"
2229 #: build/C/man3/getspnam.3:240
2231 msgid "I</etc/.pwd.lock>"
2235 #: build/C/man3/getspnam.3:243
2240 #: build/C/man3/getspnam.3:249
2242 "The include file I<E<lt>paths.hE<gt>> defines the constant B<_PATH_SHADOW> "
2243 "to the pathname of the shadow password file."
2247 #: build/C/man3/getspnam.3:253
2249 "The shadow password database and its associated API are not specified in "
2250 "POSIX.1-2001. However, many other systems provide a similar API."
2254 #: build/C/man3/getspnam.3:258
2255 msgid "B<getgrnam>(3), B<getpwnam>(3), B<getpwnam_r>(3), B<shadow>(5)"
2259 #: build/C/man5/group.5:26
2265 #: build/C/man5/group.5:29
2266 msgid "group - user group file"
2270 #: build/C/man5/group.5:34
2272 "The I</etc/group> file is a text file that defines the groups on the "
2273 "system. There is one entry per line, with the following format:"
2277 #: build/C/man5/group.5:37
2278 msgid "group_name:password:GID:user_list"
2282 #: build/C/man5/group.5:40
2283 msgid "The fields are as follows:"
2287 #: build/C/man5/group.5:40
2289 msgid "I<group_name>"
2293 #: build/C/man5/group.5:43
2294 msgid "the name of the group."
2298 #: build/C/man5/group.5:43 build/C/man5/passwd.5:91
2304 #: build/C/man5/group.5:47
2306 "the (encrypted) group password. If this field is empty, no password is "
2311 #: build/C/man5/group.5:47 build/C/man5/passwd.5:103
2317 #: build/C/man5/group.5:50
2318 msgid "the numeric group ID."
2322 #: build/C/man5/group.5:50
2324 msgid "I<user_list>"
2328 #: build/C/man5/group.5:53
2329 msgid "a list of the usernames that are members of this group, separated by commas."
2333 #: build/C/man5/group.5:55
2338 #: build/C/man5/group.5:61
2340 "As the 4.2BSD B<initgroups>(3) man page says: No-one seems to keep "
2341 "I</etc/group> up-to-date."
2345 #: build/C/man5/group.5:67
2346 msgid "B<login>(1), B<newgrp>(1), B<getgrent>(3), B<getgrnam>(3), B<passwd>(5)"
2350 #: build/C/man3/initgroups.3:32
2356 #: build/C/man3/initgroups.3:32
2362 #: build/C/man3/initgroups.3:35
2363 msgid "initgroups - initialize the supplementary group access list"
2367 #: build/C/man3/initgroups.3:41
2369 msgid "B<int initgroups(const char *>I<user>B<, gid_t >I<group>B<);>\n"
2373 #: build/C/man3/initgroups.3:50
2374 msgid "B<initgroups>(): _BSD_SOURCE"
2378 #: build/C/man3/initgroups.3:64
2380 "The B<initgroups>() function initializes the group access list by reading "
2381 "the group database I</etc/group> and using all groups of which I<user> is a "
2382 "member. The additional group I<group> is also added to the list."
2386 #: build/C/man3/initgroups.3:68
2387 msgid "The I<user> argument must be non-NULL."
2391 #: build/C/man3/initgroups.3:75
2393 "The B<initgroups>() function returns 0 on success. On error, -1 is "
2394 "returned, and I<errno> is set appropriately."
2398 #: build/C/man3/initgroups.3:79
2399 msgid "Insufficient memory to allocate group information structure."
2403 #: build/C/man3/initgroups.3:79
2409 #: build/C/man3/initgroups.3:84
2411 "The calling process has insufficient privilege. See the underlying system "
2412 "call B<setgroups>(2)."
2416 #: build/C/man3/initgroups.3:87
2418 msgid "I</etc/group>\t\tgroup database file\n"
2422 #: build/C/man3/initgroups.3:90
2423 msgid "SVr4, 4.3BSD."
2427 #: build/C/man3/initgroups.3:94
2428 msgid "B<getgroups>(2), B<setgroups>(2), B<credentials>(7)"
2432 #: build/C/man5/passwd.5:30
2438 #: build/C/man5/passwd.5:30
2444 #: build/C/man5/passwd.5:33
2445 msgid "passwd - password file"
2449 #: build/C/man5/passwd.5:41
2451 "The I</etc/passwd> file is a text file that describes user login accounts "
2452 "for the system. It should have read permission allowed for all users (many "
2453 "utilities, like B<ls>(1) use it to map user IDs to usernames), but write "
2454 "access only for the superuser."
2458 #: build/C/man5/passwd.5:53
2460 "In the good old days there was no great problem with this general read "
2461 "permission. Everybody could read the encrypted passwords, but the hardware "
2462 "was too slow to crack a well-chosen password, and moreover the basic "
2463 "assumption used to be that of a friendly user-community. These days many "
2464 "people run some version of the shadow password suite, where I</etc/passwd> "
2465 "has an \\(aqx\\(aq character in the password field, and the encrypted "
2466 "passwords are in I</etc/shadow>, which is readable by the superuser only."
2470 #: build/C/man5/passwd.5:62
2472 "If the encrypted password, whether in I</etc/passwd> or in I</etc/shadow>, "
2473 "is an empty string, login is allowed without even asking for a password. "
2474 "Note that this functionality may be intentionally disabled in applications, "
2475 "or configurable (for example using the \"nullok\" or \"nonull\" arguments to "
2480 #: build/C/man5/passwd.5:67
2482 "If the encrypted password in I</etc/passwd> is \"I<*NP*>\" (without the "
2483 "quotes), the shadow record should be obtained from an NIS+ server."
2487 #: build/C/man5/passwd.5:73
2489 "Regardless of whether shadow passwords are used, many system administrators "
2490 "use an asterisk (*) in the encrypted password field to make sure that this "
2491 "user can not authenticate him- or herself using a password. (But see NOTES "
2496 #: build/C/man5/passwd.5:78
2498 "If you create a new login, first put an asterisk (*) in the password field, "
2499 "then use B<passwd>(1) to set it."
2503 #: build/C/man5/passwd.5:81
2505 "Each line of the file describes a single user, and contains seven "
2506 "colon-separated fields:"
2510 #: build/C/man5/passwd.5:84
2511 msgid "name:password:UID:GID:GECOS:directory:shell"
2515 #: build/C/man5/passwd.5:87
2516 msgid "The field are as follows:"
2520 #: build/C/man5/passwd.5:87
2526 #: build/C/man5/passwd.5:91
2527 msgid "This is the user's login name. It should not contain capital letters."
2531 #: build/C/man5/passwd.5:98
2533 "This is either the encrypted user password, an asterisk (*), or the letter "
2534 "\\(aqx\\(aq. (See B<pwconv>(8) for an explanation of \\(aqx\\(aq.)"
2538 #: build/C/man5/passwd.5:98
2544 #: build/C/man5/passwd.5:103
2545 msgid "The privileged I<root> login account (superuser) has the user ID 0."
2549 #: build/C/man5/passwd.5:108
2551 "This is the numeric primary group ID for this user. (Additional groups for "
2552 "the user are defined in the system group file; see B<group>(5))."
2556 #: build/C/man5/passwd.5:108
2562 #: build/C/man5/passwd.5:116
2564 "This field (sometimes called the \"comment field\") is optional and used "
2565 "only for informational purposes. Usually, it contains the full username. "
2566 "Some programs (for example, B<finger>(1)) display information from this "
2571 #: build/C/man5/passwd.5:125
2573 "GECOS stands for \"General Electric Comprehensive Operating System\", which "
2574 "was renamed to GCOS when GE's large systems division was sold to Honeywell. "
2575 "Dennis Ritchie has reported: \"Sometimes we sent printer output or batch "
2576 "jobs to the GCOS machine. The gcos field in the password file was a place "
2577 "to stash the information for the $IDENTcard. Not elegant.\""
2581 #: build/C/man5/passwd.5:125
2583 msgid "I<directory>"
2587 #: build/C/man5/passwd.5:132
2589 "This is the user's home directory: the initial directory where the user is "
2590 "placed after logging in. The value in this field is used to set the B<HOME> "
2591 "environment variable."
2595 #: build/C/man5/passwd.5:132
2601 #: build/C/man5/passwd.5:142
2603 "This is the program to run at login (if empty, use I</bin/sh>). If set to a "
2604 "nonexistent executable, the user will be unable to login through "
2605 "B<login>(1). The value in this field is used to set the B<SHELL> "
2606 "environment variable."
2610 #: build/C/man5/passwd.5:148
2612 "If you want to create user groups, there must be an entry in I</etc/group>, "
2613 "or no group will exist."
2617 #: build/C/man5/passwd.5:162
2619 "If the encrypted password is set to an asterisk (*), the user will be unable "
2620 "to login using B<login>(1), but may still login using B<rlogin>(1), run "
2621 "existing processes and initiate new ones through B<rsh>(1), B<cron>(8), "
2622 "B<at>(1), or mail filters, etc. Trying to lock an account by simply "
2623 "changing the shell field yields the same result and additionally allows the "
2628 #: build/C/man5/passwd.5:171
2630 "B<login>(1), B<passwd>(1), B<su>(1), B<getpwent>(3), B<getpwnam>(3), "
2631 "B<crypt>(3), B<group>(5), B<shadow>(5)"
2635 #: build/C/man3/putgrent.3:7
2641 #: build/C/man3/putgrent.3:7 build/C/man3/setaliasent.3:9
2647 #: build/C/man3/putgrent.3:10
2648 msgid "putgrent - write a group database entry to a file"
2652 #: build/C/man3/putgrent.3:12
2653 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
2657 #: build/C/man3/putgrent.3:16
2658 msgid "B<int putgrent(const struct group *>I<grp>B<, FILE *>I<fp>B<);>"
2662 #: build/C/man3/putgrent.3:27
2664 "The B<putgrent>() function is the counterpart for B<fgetgrent>(3). The "
2665 "function writes the content of the provided I<struct group> into the file "
2666 "pointed to by I<fp>. The list of group members must be NULL-terminated or "
2671 #: build/C/man3/putgrent.3:31
2672 msgid "The I<struct group> is defined as follows:"
2676 #: build/C/man3/putgrent.3:40
2680 " char *gr_name; /* group name */\n"
2681 " char *gr_passwd; /* group password */\n"
2682 " gid_t gr_gid; /* group ID */\n"
2683 " char **gr_mem; /* group members */\n"
2688 #: build/C/man3/putgrent.3:44
2689 msgid "The function returns zero on success, and a nonzero value on error."
2693 #: build/C/man3/putgrent.3:46
2694 msgid "This function is a GNU extension."
2698 #: build/C/man3/putgrent.3:50
2699 msgid "B<fgetgrent>(3), B<getgrent>(3), B<group>(5)"
2703 #: build/C/man3/putpwent.3:30
2709 #: build/C/man3/putpwent.3:33
2710 msgid "putpwent - write a password file entry"
2714 #: build/C/man3/putpwent.3:40
2716 msgid "B<int putpwent(const struct passwd *>I<p>B<, FILE *>I<stream>B<);>\n"
2720 #: build/C/man3/putpwent.3:49
2721 msgid "B<putpwent>(): _SVID_SOURCE"
2725 #: build/C/man3/putpwent.3:54
2727 "The B<putpwent>() function writes a password entry from the structure I<p> "
2728 "in the file associated with I<stream>."
2732 #: build/C/man3/putpwent.3:68
2736 " char *pw_name; /* username */\n"
2737 " char *pw_passwd; /* user password */\n"
2738 " uid_t pw_uid; /* user ID */\n"
2739 " gid_t pw_gid; /* group ID */\n"
2740 " char *pw_gecos; /* real name */\n"
2741 " char *pw_dir; /* home directory */\n"
2742 " char *pw_shell; /* shell program */\n"
2747 #: build/C/man3/putpwent.3:78
2749 "The B<putpwent>() function returns 0 on success, or -1 if an error occurs. "
2750 "In the event of an error, I<errno> is set to indicate the cause."
2754 #: build/C/man3/putpwent.3:82
2755 msgid "Invalid (NULL) argument given."
2759 #: build/C/man3/putpwent.3:92
2761 "B<endpwent>(3), B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), "
2762 "B<getpwnam>(3), B<getpwuid>(3), B<setpwent>(3)"
2766 #: build/C/man3/setaliasent.3:9
2772 #: build/C/man3/setaliasent.3:13
2774 "setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname, "
2775 "getaliasbyname_r - read an alias entry"
2779 #: build/C/man3/setaliasent.3:15
2780 msgid "B<#include E<lt>aliases.hE<gt>>"
2784 #: build/C/man3/setaliasent.3:17
2785 msgid "B<void setaliasent(void);>"
2789 #: build/C/man3/setaliasent.3:19
2790 msgid "B<void endaliasent(void);>"
2794 #: build/C/man3/setaliasent.3:21
2795 msgid "B<struct aliasent *getaliasent(void);>"
2799 #: build/C/man3/setaliasent.3:23
2800 msgid "B<int getaliasent_r(struct aliasent *>I<result>B<,>"
2804 #: build/C/man3/setaliasent.3:25 build/C/man3/setaliasent.3:31
2805 msgid "B< char *>I<buffer>B<, size_t >I<buflen>B<, struct aliasent **>I<res>B<);>"
2809 #: build/C/man3/setaliasent.3:27
2810 msgid "B<struct aliasent *getaliasbyname(const char *>I<name>B<);>"
2814 #: build/C/man3/setaliasent.3:29
2816 "B<int getaliasbyname_r(const char *>I<name>B<, struct aliasent "
2821 #: build/C/man3/setaliasent.3:37
2823 "One of the databases available with the Name Service Switch (NSS) is the "
2824 "aliases database, that contains mail aliases. (To find out which databases "
2825 "are supported, try I<getent --help>.) Six functions are provided to access "
2826 "the aliases database."
2830 #: build/C/man3/setaliasent.3:44
2832 "The B<getaliasent>() function returns a pointer to a structure containing "
2833 "the group information from the aliases database. The first time it is "
2834 "called it returns the first entry; thereafter, it returns successive "
2839 #: build/C/man3/setaliasent.3:49
2841 "The B<setaliasent>() function rewinds the file pointer to the beginning of "
2842 "the aliases database."
2846 #: build/C/man3/setaliasent.3:53
2847 msgid "The B<endaliasent>() function closes the aliases database."
2851 #: build/C/man3/setaliasent.3:60
2853 "B<getaliasent_r>() is the reentrant version of the previous function. The "
2854 "requested structure is stored via the first argument but the programmer "
2855 "needs to fill the other arguments also. Not providing enough space causes "
2856 "the function to fail."
2860 #: build/C/man3/setaliasent.3:66
2862 "The function B<getaliasbyname>() takes the name argument and searches the "
2863 "aliases database. The entry is returned as a pointer to a I<struct "
2868 #: build/C/man3/setaliasent.3:73
2870 "B<getaliasbyname_r>() is the reentrant version of the previous function. "
2871 "The requested structure is stored via the second argument but the programmer "
2872 "needs to fill the other arguments also. Not providing enough space causes "
2873 "the function to fail."
2877 #: build/C/man3/setaliasent.3:78
2878 msgid "The I<struct aliasent> is defined in I<E<lt>aliases.hE<gt>>:"
2882 #: build/C/man3/setaliasent.3:87
2885 "struct aliasent {\n"
2886 " char *alias_name; /* alias name */\n"
2887 " size_t alias_members_len;\n"
2888 " char **alias_members; /* alias name list */\n"
2889 " int alias_local;\n"
2894 #: build/C/man3/setaliasent.3:95
2896 "The functions B<getaliasent_r>() and B<getaliasbyname_r>() return a "
2897 "nonzero value on error."
2901 #: build/C/man3/setaliasent.3:101
2903 "The default alias database is the file I</etc/aliases>. This can be changed "
2904 "in the I</etc/nsswitch.conf> file."
2908 #: build/C/man3/setaliasent.3:104
2909 msgid "These routines are glibc-specific. The NeXT system has similar routines:"
2913 #: build/C/man3/setaliasent.3:108
2915 msgid "#include E<lt>aliasdb.hE<gt>\n"
2919 #: build/C/man3/setaliasent.3:113
2922 "void alias_setent(void);\n"
2923 "void alias_endent(void);\n"
2924 "alias_ent *alias_getent(void);\n"
2925 "alias_ent *alias_getbyname(char *name);\n"
2929 #: build/C/man3/setaliasent.3:119
2931 "The following example compiles with I<gcc example.c -o example>. It will "
2932 "dump all names in the alias database."
2936 #: build/C/man3/setaliasent.3:125
2939 "#include E<lt>aliases.hE<gt>\n"
2940 "#include E<lt>stdio.hE<gt>\n"
2941 "#include E<lt>stdlib.hE<gt>\n"
2942 "#include E<lt>errno.hE<gt>\n"
2946 #: build/C/man3/setaliasent.3:144
2952 " struct aliasent *al;\n"
2955 " al = getaliasent();\n"
2956 " if (al == NULL)\n"
2958 " printf(\"Name: %s\\en\", al-E<gt>alias_name);\n"
2961 " perror(\"reading alias\");\n"
2962 " exit(EXIT_FAILURE);\n"
2965 " exit(EXIT_SUCCESS);\n"
2970 #. /etc/sendmail/aliases
2972 #. newaliases, postalias
2974 #: build/C/man3/setaliasent.3:154
2975 msgid "B<getgrent>(3), B<getpwent>(3), B<getspent>(3), B<aliases>(5)"