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: 2012-03-22 04:26+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:28
26 #: build/C/man3/fgetgrent.3:28 build/C/man3/fgetpwent.3:31
32 #: build/C/man3/fgetgrent.3:28 build/C/man3/fgetpwent.3:31 build/C/man3/getgrent_r.3:23 build/C/man3/getgrouplist.3:27 build/C/man3/getpw.3:30 build/C/man3/getpwent.3:31 build/C/man3/getpwent_r.3:23 build/C/man3/getpwnam.3:35 build/C/man3/getspnam.3:6 build/C/man3/initgroups.3:30 build/C/man3/putgrent.3:4 build/C/man3/putpwent.3:28 build/C/man3/setaliasent.3:6
38 #: build/C/man3/fgetgrent.3:28 build/C/man3/fgetpwent.3:31 build/C/man5/ftpusers.5:17 build/C/man3/getgrent.3:28 build/C/man3/getgrent_r.3:23 build/C/man3/getgrnam.3:31 build/C/man3/getgrouplist.3:27 build/C/man3/getpw.3:30 build/C/man3/getpwent.3:31 build/C/man3/getpwent_r.3:23 build/C/man3/getpwnam.3:35 build/C/man3/getspnam.3:6 build/C/man5/group.5:25 build/C/man3/initgroups.3:30 build/C/man5/passwd.5:29 build/C/man3/putgrent.3:4 build/C/man3/putpwent.3:28 build/C/man3/setaliasent.3:6
40 msgid "Linux Programmer's Manual"
44 #: build/C/man3/fgetgrent.3:29 build/C/man3/fgetpwent.3:32 build/C/man5/ftpusers.5:18 build/C/man3/getgrent.3:29 build/C/man3/getgrent_r.3:24 build/C/man3/getgrnam.3:32 build/C/man3/getgrouplist.3:28 build/C/man3/getpw.3:31 build/C/man3/getpwent.3:32 build/C/man3/getpwent_r.3:24 build/C/man3/getpwnam.3:36 build/C/man3/getspnam.3:7 build/C/man5/group.5:26 build/C/man3/initgroups.3:31 build/C/man5/passwd.5:30 build/C/man3/putgrent.3:5 build/C/man3/putpwent.3:29 build/C/man3/setaliasent.3:7
50 #: build/C/man3/fgetgrent.3:31
51 msgid "fgetgrent - get group file entry"
55 #: build/C/man3/fgetgrent.3:31 build/C/man3/fgetpwent.3:34 build/C/man3/getgrent.3:31 build/C/man3/getgrent_r.3:26 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:26 build/C/man3/getpwnam.3:38 build/C/man3/getspnam.3:11 build/C/man3/initgroups.3:33 build/C/man3/putgrent.3:7 build/C/man3/putpwent.3:31 build/C/man3/setaliasent.3:10
61 #: build/C/man3/fgetgrent.3:36
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:38
72 msgid "B<struct group *fgetgrent(FILE *>I<stream>B<);>\n"
76 #: build/C/man3/fgetgrent.3:43 build/C/man3/fgetpwent.3:46 build/C/man3/getgrent.3:46 build/C/man3/getgrent_r.3:42 build/C/man3/getgrnam.3:55 build/C/man3/getgrouplist.3:40 build/C/man3/getpwent.3:49 build/C/man3/getpwent_r.3:42 build/C/man3/getpwnam.3:59 build/C/man3/getspnam.3:59 build/C/man3/initgroups.3:44 build/C/man3/putpwent.3:43
77 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
81 #: build/C/man3/fgetgrent.3:47
82 msgid "B<fgetgrent>(): _SVID_SOURCE"
86 #: build/C/man3/fgetgrent.3:47 build/C/man3/fgetpwent.3:50 build/C/man5/ftpusers.5:20 build/C/man3/getgrent.3:66 build/C/man3/getgrent_r.3:50 build/C/man3/getgrnam.3:65 build/C/man3/getgrouplist.3:44 build/C/man3/getpw.3:41 build/C/man3/getpwent.3:60 build/C/man3/getpwent_r.3:49 build/C/man3/getpwnam.3:69 build/C/man3/getspnam.3:70 build/C/man5/group.5:28 build/C/man3/initgroups.3:48 build/C/man5/passwd.5:32 build/C/man3/putgrent.3:13 build/C/man3/putpwent.3:47 build/C/man3/setaliasent.3:28
92 #: build/C/man3/fgetgrent.3:61
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:63 build/C/man3/getgrent.3:90 build/C/man3/getgrent_r.3:67 build/C/man3/getgrnam.3:84
103 msgid "The I<group> structure is defined in I<E<lt>grp.hE<gt>> as follows:"
107 #: build/C/man3/fgetgrent.3:72
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:74 build/C/man3/fgetpwent.3:79 build/C/man3/getgrent.3:104 build/C/man3/getgrent_r.3:100 build/C/man3/getgrnam.3:128 build/C/man3/getgrouplist.3:76 build/C/man3/getpw.3:70 build/C/man3/getpwent.3:101 build/C/man3/getpwent_r.3:102 build/C/man3/getpwnam.3:135 build/C/man3/getspnam.3:212 build/C/man3/initgroups.3:60 build/C/man3/putgrent.3:35 build/C/man3/putpwent.3:68 build/C/man3/setaliasent.3:85
125 #: build/C/man3/fgetgrent.3:81
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."
132 #: build/C/man3/fgetgrent.3:81 build/C/man3/fgetpwent.3:86 build/C/man3/getgrent.3:127 build/C/man3/getgrent_r.3:107 build/C/man3/getgrnam.3:166 build/C/man3/getpw.3:76 build/C/man3/getpwent.3:123 build/C/man3/getpwent_r.3:109 build/C/man3/getpwnam.3:173 build/C/man3/getspnam.3:223 build/C/man3/initgroups.3:67 build/C/man3/putpwent.3:73
138 #: build/C/man3/fgetgrent.3:82 build/C/man3/fgetpwent.3:87 build/C/man3/getgrent.3:140 build/C/man3/getgrnam.3:188 build/C/man3/getpw.3:85 build/C/man3/getpwent.3:138 build/C/man3/getpwnam.3:195 build/C/man3/initgroups.3:68
144 #. to allocate the group structure, or to allocate buffers
146 #: build/C/man3/fgetgrent.3:87 build/C/man3/getgrent.3:146 build/C/man3/getgrnam.3:195
147 msgid "Insufficient memory to allocate I<group> structure."
151 #: build/C/man3/fgetgrent.3:87 build/C/man3/fgetpwent.3:96 build/C/man3/getgrent.3:153 build/C/man3/getgrent_r.3:115 build/C/man3/getgrnam.3:202 build/C/man3/getgrouplist.3:96 build/C/man3/getpw.3:94 build/C/man3/getpwent.3:152 build/C/man3/getpwent_r.3:117 build/C/man3/getpwnam.3:209 build/C/man3/getspnam.3:240 build/C/man3/initgroups.3:80 build/C/man3/putgrent.3:37 build/C/man3/putpwent.3:77 build/C/man3/setaliasent.3:97
153 msgid "CONFORMING TO"
157 #: build/C/man3/fgetgrent.3:89 build/C/man3/fgetpwent.3:98 build/C/man3/putpwent.3:79
162 #: build/C/man3/fgetgrent.3:89 build/C/man3/fgetpwent.3:98 build/C/man5/ftpusers.5:47 build/C/man3/getgrent.3:155 build/C/man3/getgrent_r.3:182 build/C/man3/getgrnam.3:225 build/C/man3/getgrouplist.3:187 build/C/man3/getpw.3:103 build/C/man3/getpwent.3:157 build/C/man3/getpwent_r.3:179 build/C/man3/getpwnam.3:305 build/C/man3/getspnam.3:244 build/C/man5/group.5:60 build/C/man3/initgroups.3:82 build/C/man5/passwd.5:131 build/C/man3/putgrent.3:39 build/C/man3/putpwent.3:79 build/C/man3/setaliasent.3:141
168 #: build/C/man3/fgetgrent.3:99
170 "B<endgrent>(3), B<fgetgrent_r>(3), B<fopen>(3), B<getgrent>(3), "
171 "B<getgrgid>(3), B<getgrnam>(3), B<putgrent>(3), B<setgrent>(3), B<group>(5)"
175 #: build/C/man3/fgetgrent.3:99 build/C/man3/fgetpwent.3:109 build/C/man5/ftpusers.5:51 build/C/man3/getgrent.3:163 build/C/man3/getgrent_r.3:189 build/C/man3/getgrnam.3:232 build/C/man3/getgrouplist.3:193 build/C/man3/getpw.3:112 build/C/man3/getpwent.3:165 build/C/man3/getpwent_r.3:187 build/C/man3/getpwnam.3:315 build/C/man3/getspnam.3:249 build/C/man5/group.5:66 build/C/man3/initgroups.3:86 build/C/man5/passwd.5:139 build/C/man3/putgrent.3:43 build/C/man3/putpwent.3:87 build/C/man3/setaliasent.3:150
181 #: build/C/man3/fgetgrent.3:106 build/C/man3/fgetpwent.3:116 build/C/man5/ftpusers.5:58 build/C/man3/getgrent.3:170 build/C/man3/getgrent_r.3:196 build/C/man3/getgrnam.3:239 build/C/man3/getgrouplist.3:200 build/C/man3/getpw.3:119 build/C/man3/getpwent.3:172 build/C/man3/getpwent_r.3:194 build/C/man3/getpwnam.3:322 build/C/man3/getspnam.3:256 build/C/man5/group.5:73 build/C/man3/initgroups.3:93 build/C/man5/passwd.5:146 build/C/man3/putgrent.3:50 build/C/man3/putpwent.3:94 build/C/man3/setaliasent.3:157
183 "This page is part of release 3.37 of the Linux I<man-pages> project. A "
184 "description of the project, and information about reporting bugs, can be "
185 "found at http://www.kernel.org/doc/man-pages/."
189 #: build/C/man3/fgetpwent.3:31
195 #: build/C/man3/fgetpwent.3:34
196 msgid "fgetpwent - get password file entry"
200 #: build/C/man3/fgetpwent.3:39 build/C/man3/putpwent.3:36
203 "B<#include E<lt>stdio.hE<gt>>\n"
204 "B<#include E<lt>sys/types.hE<gt>>\n"
205 "B<#include E<lt>pwd.hE<gt>>\n"
209 #: build/C/man3/fgetpwent.3:41
211 msgid "B<struct passwd *fgetpwent(FILE *>I<stream>B<);>\n"
215 #: build/C/man3/fgetpwent.3:50
216 msgid "B<fgetpwent>(): _SVID_SOURCE"
220 #: build/C/man3/fgetpwent.3:63
222 "The B<fgetpwent>() function returns a pointer to a structure containing the "
223 "broken out fields of a line in the file I<stream>. The first time it is "
224 "called it returns the first entry; thereafter, it returns successive "
225 "entries. The file referred to by I<stream> must have the same format as "
226 "I</etc/passwd> (see B<passwd>(5))."
230 #: build/C/man3/fgetpwent.3:65 build/C/man3/getpw.3:53 build/C/man3/getpwent.3:84 build/C/man3/getpwent_r.3:66 build/C/man3/getpwnam.3:88 build/C/man3/putpwent.3:54
231 msgid "The I<passwd> structure is defined in I<E<lt>pwd.hE<gt>> as follows:"
235 #: build/C/man3/fgetpwent.3:77
239 " char *pw_name; /* username */\n"
240 " char *pw_passwd; /* user password */\n"
241 " uid_t pw_uid; /* user ID */\n"
242 " gid_t pw_gid; /* group ID */\n"
243 " char *pw_gecos; /* real name */\n"
244 " char *pw_dir; /* home directory */\n"
245 " char *pw_shell; /* shell program */\n"
250 #: build/C/man3/fgetpwent.3:86
252 "The B<fgetpwent>() function returns a pointer to a I<passwd> structure, or "
253 "NULL if there are no more entries or an error occurs."
257 #. This structure is static, allocated 0 or 1 times. No memory leak. (libc45)
259 #: build/C/man3/fgetpwent.3:92 build/C/man3/getpw.3:90 build/C/man3/getpwent.3:145 build/C/man3/getpwnam.3:202
260 msgid "Insufficient memory to allocate I<passwd> structure."
264 #: build/C/man3/fgetpwent.3:92 build/C/man5/ftpusers.5:45 build/C/man3/getgrent.3:149 build/C/man3/getgrnam.3:198 build/C/man3/getpw.3:90 build/C/man3/getpwent.3:148 build/C/man3/getpwnam.3:205 build/C/man3/getspnam.3:227 build/C/man5/group.5:52 build/C/man3/initgroups.3:76 build/C/man5/passwd.5:111 build/C/man3/setaliasent.3:91
270 #: build/C/man3/fgetpwent.3:93 build/C/man3/getpw.3:91 build/C/man3/getpwent.3:149 build/C/man3/getpwnam.3:206 build/C/man5/passwd.5:113
272 msgid "I</etc/passwd>"
276 #: build/C/man3/fgetpwent.3:96 build/C/man3/getpw.3:94
277 msgid "password database file"
281 #: build/C/man3/fgetpwent.3:109
283 "B<endpwent>(3), B<fgetpwent_r>(3), B<fopen>(3), B<getpw>(3), B<getpwent>(3), "
284 "B<getpwnam>(3), B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
288 #: build/C/man5/ftpusers.5:17
294 #: build/C/man5/ftpusers.5:17
300 #: build/C/man5/ftpusers.5:17 build/C/man5/group.5:25 build/C/man5/passwd.5:29
306 #: build/C/man5/ftpusers.5:20
307 msgid "ftpusers - list of users that may not log in via the FTP daemon"
311 #: build/C/man5/ftpusers.5:39
313 "The text file B<ftpusers> contains a list of users that may not log in using "
314 "the File Transfer Protocol (FTP) server daemon. This file is used not "
315 "merely for system administration purposes but for improving security within "
316 "a TCP/IP networked environment. It will typically contain a list of the "
317 "users that either have no business using ftp or have too many privileges to "
318 "be allowed to log in through the FTP server daemon. Such users usually "
319 "include root, daemon, bin, uucp, and news. If your FTP server daemon "
320 "doesn't use B<ftpusers> then it is suggested that you read its documentation "
321 "to find out how to block access for certain users. Washington University "
322 "FTP server Daemon (wuftpd) and Professional FTP Daemon (proftpd) are known "
323 "to make use of B<ftpusers>."
327 #: build/C/man5/ftpusers.5:39
333 #: build/C/man5/ftpusers.5:45
335 "The format of B<ftpusers> is very simple. There is one account name (or "
336 "username) per line. Lines starting with a # are ignored."
340 #: build/C/man5/ftpusers.5:47
341 msgid "I</etc/ftpusers>"
345 #: build/C/man5/ftpusers.5:51
346 msgid "B<passwd>(5), B<proftpd>(8), B<wuftpd>(8)"
350 #: build/C/man3/getgrent.3:28
356 #: build/C/man3/getgrent.3:28 build/C/man3/getgrent_r.3:23 build/C/man3/getgrnam.3:31 build/C/man3/getpw.3:30 build/C/man3/getpwent.3:31 build/C/man3/getpwent_r.3:23 build/C/man3/getpwnam.3:35 build/C/man5/group.5:25
362 #: build/C/man3/getgrent.3:31
363 msgid "getgrent, setgrent, endgrent - get group file entry"
367 #: build/C/man3/getgrent.3:35 build/C/man3/getgrnam.3:38 build/C/man3/initgroups.3:37
370 "B<#include E<lt>sys/types.hE<gt>>\n"
371 "B<#include E<lt>grp.hE<gt>>\n"
375 #: build/C/man3/getgrent.3:37
377 msgid "B<struct group *getgrent(void);>\n"
381 #: build/C/man3/getgrent.3:39
383 msgid "B<void setgrent(void);>\n"
387 #: build/C/man3/getgrent.3:41
389 msgid "B<void endgrent(void);>\n"
393 #: build/C/man3/getgrent.3:51
394 msgid "B<setgrent>():"
398 #: build/C/man3/getgrent.3:54
400 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
401 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED ||"
405 #: build/C/man3/getgrent.3:56
406 msgid "/* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
410 #: build/C/man3/getgrent.3:60
411 msgid "B<getgrent>(), B<endgrent>():"
415 #: build/C/man3/getgrent.3:63
417 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
418 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
422 #: build/C/man3/getgrent.3:78
424 "The B<getgrent>() function returns a pointer to a structure containing the "
425 "broken-out fields of a record in the group database (e.g., the local group "
426 "file I</etc/group>, NIS, and LDAP). The first time B<getgrent>() is "
427 "called, it returns the first entry; thereafter, it returns successive "
432 #: build/C/man3/getgrent.3:83
434 "The B<setgrent>() function rewinds to the beginning of the group database, "
435 "to allow repeated scans."
439 #: build/C/man3/getgrent.3:88
441 "The B<endgrent>() function is used to close the group database after all "
442 "processing has been performed."
446 #: build/C/man3/getgrent.3:99 build/C/man3/getgrnam.3:93
450 " char *gr_name; /* group name */\n"
451 " char *gr_passwd; /* group password */\n"
452 " gid_t gr_gid; /* group ID */\n"
453 " char **gr_mem; /* group members */\n"
458 #: build/C/man3/getgrent.3:104 build/C/man3/getgrent_r.3:81 build/C/man3/getgrnam.3:98
459 msgid "For more information about the fields of this structure, see B<group>(5)."
463 #: build/C/man3/getgrent.3:111
465 "The B<getgrent>() function returns a pointer to a I<group> structure, or "
466 "NULL if there are no more entries or an error occurs."
470 #: build/C/man3/getgrent.3:118
472 "Upon error, I<errno> may be set. If one wants to check I<errno> after the "
473 "call, it should be set to zero before the call."
477 #: build/C/man3/getgrent.3:127
479 "The return value may point to a static area, and may be overwritten by "
480 "subsequent calls to B<getgrent>(), B<getgrgid>(3), or B<getgrnam>(3). (Do "
481 "not pass the returned pointer to B<free>(3).)"
485 #: build/C/man3/getgrent.3:128 build/C/man3/getgrnam.3:174 build/C/man3/getpwent.3:124 build/C/man3/getpwnam.3:181
491 #: build/C/man3/getgrent.3:131 build/C/man3/getgrnam.3:177 build/C/man3/getpwent.3:127 build/C/man3/getpwnam.3:184
492 msgid "A signal was caught."
496 #: build/C/man3/getgrent.3:131 build/C/man3/getgrnam.3:177 build/C/man3/getpwent.3:127 build/C/man3/getpwnam.3:184
502 #: build/C/man3/getgrent.3:134 build/C/man3/getgrnam.3:180 build/C/man3/getpwent.3:130 build/C/man3/getpwnam.3:187
507 #: build/C/man3/getgrent.3:134 build/C/man3/getgrnam.3:180 build/C/man3/getpwent.3:130 build/C/man3/getpwnam.3:187
513 #: build/C/man3/getgrent.3:137
514 msgid "The calling process already has too many open files."
518 #: build/C/man3/getgrent.3:137 build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:135 build/C/man3/getpwnam.3:192
524 #: build/C/man3/getgrent.3:140
525 msgid "Too many open files in the system."
529 #: build/C/man3/getgrent.3:146 build/C/man3/getgrent_r.3:111 build/C/man3/getgrnam.3:195 build/C/man3/getpwent.3:145 build/C/man3/getpwent_r.3:113 build/C/man3/getpwnam.3:202 build/C/man3/getspnam.3:224
535 #: build/C/man3/getgrent.3:149 build/C/man3/getgrnam.3:198 build/C/man3/getpwent.3:148 build/C/man3/getpwnam.3:205
536 msgid "Insufficient buffer space supplied."
540 #: build/C/man3/getgrent.3:150 build/C/man3/getgrnam.3:199
542 msgid "I</etc/group>"
546 #: build/C/man3/getgrent.3:153 build/C/man3/getgrnam.3:202
547 msgid "local group database file"
551 #: build/C/man3/getgrent.3:155 build/C/man3/getgrnam.3:204
552 msgid "SVr4, 4.3BSD, POSIX.1-2001."
556 #: build/C/man3/getgrent.3:163
558 "B<fgetgrent>(3), B<getgrent_r>(3), B<getgrgid>(3), B<getgrnam>(3), "
559 "B<getgrouplist>(3), B<putgrent>(3), B<group>(5)"
563 #: build/C/man3/getgrent_r.3:23
569 #: build/C/man3/getgrent_r.3:26
570 msgid "getgrent_r, fgetgrent_r - get group file entry reentrantly"
574 #: build/C/man3/getgrent_r.3:29
576 msgid "B<#include E<lt>grp.hE<gt>>\n"
580 #: build/C/man3/getgrent_r.3:31
582 msgid "B<int getgrent_r(struct group *>I<gbuf>B<, char *>I<buf>B<,>\n"
586 #: build/C/man3/getgrent_r.3:33
588 msgid "B< size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
592 #: build/C/man3/getgrent_r.3:35
595 "B<int fgetgrent_r(FILE *>I<fp>B<, struct group *>I<gbuf>B<, char "
600 #: build/C/man3/getgrent_r.3:37
602 msgid "B< size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
605 #. FIXME . The FTM requirements seem inconsistent here. File a glibc bug?
607 #: build/C/man3/getgrent_r.3:47
608 msgid "B<getgrent_r>(): _GNU_SOURCE"
612 #: build/C/man3/getgrent_r.3:50
613 msgid "B<fgetgrent_r>(): _SVID_SOURCE"
617 #: build/C/man3/getgrent_r.3:63
619 "The functions B<getgrent_r>() and B<fgetgrent_r>() are the reentrant "
620 "versions of B<getgrent>(3) and B<fgetgrent>(3). The former reads the next "
621 "group entry from the stream initialized by B<setgrent>(3). The latter reads "
622 "the next group entry from the stream I<fp>."
626 #: build/C/man3/getgrent_r.3:76
630 " char *gr_name; /* group name */\n"
631 " char *gr_passwd; /* group password */\n"
632 " gid_t gr_gid; /* group ID */\n"
633 " char **gr_mem; /* group members */\n"
638 #: build/C/man3/getgrent_r.3:100
640 "The nonreentrant functions return a pointer to static storage, where this "
641 "static storage contains further pointers to group name, password and "
642 "members. The reentrant functions described here return all of that in "
643 "caller-provided buffers. First of all there is the buffer I<gbuf> that can "
644 "hold a I<struct group>. And next the buffer I<buf> of size I<buflen> that "
645 "can hold additional strings. The result of these functions, the I<struct "
646 "group> read from the stream, is stored in the provided buffer I<*gbuf>, and "
647 "a pointer to this I<struct group> is returned in I<*gbufp>."
651 #: build/C/man3/getgrent_r.3:107
653 "On success, these functions return 0 and I<*gbufp> is a pointer to the "
654 "I<struct group>. On error, these functions return an error value and "
659 #: build/C/man3/getgrent_r.3:108 build/C/man3/getpw.3:81 build/C/man3/getpwent_r.3:110
665 #: build/C/man3/getgrent_r.3:111 build/C/man3/getpwent_r.3:113
666 msgid "No more entries."
670 #: build/C/man3/getgrent_r.3:115 build/C/man3/getpwent_r.3:117
671 msgid "Insufficient buffer space supplied. Try again with larger buffer."
675 #: build/C/man3/getgrent_r.3:120 build/C/man3/getpwent_r.3:122
677 "These functions are GNU extensions, done in a style resembling the POSIX "
678 "version of functions like B<getpwnam_r>(3). Other systems use prototype"
682 #: build/C/man3/getgrent_r.3:125
685 "struct group *getgrent_r(struct group *grp, char *buf,\n"
690 #: build/C/man3/getgrent_r.3:129 build/C/man3/getpwent_r.3:131
695 #: build/C/man3/getgrent_r.3:134
698 "int getgrent_r(struct group *grp, char *buf, int buflen,\n"
703 #: build/C/man3/getgrent_r.3:136 build/C/man3/getgrnam.3:204 build/C/man3/getpwent_r.3:139 build/C/man3/getpwnam.3:214 build/C/man5/passwd.5:113
709 #: build/C/man3/getgrent_r.3:141
711 "The function B<getgrent_r>() is not really reentrant since it shares the "
712 "reading position in the stream with all other threads."
716 #: build/C/man3/getgrent_r.3:141 build/C/man3/getgrouplist.3:107 build/C/man3/getpwent_r.3:144 build/C/man3/getpwnam.3:253 build/C/man3/setaliasent.3:111
722 #: build/C/man3/getgrent_r.3:148
725 "#define _GNU_SOURCE\n"
726 "#include E<lt>grp.hE<gt>\n"
727 "#include E<lt>stdio.hE<gt>\n"
728 "#include E<lt>stdlib.hE<gt>\n"
729 "#define BUFLEN 4096\n"
733 #: build/C/man3/getgrent_r.3:155
739 " struct group grp, *grpp;\n"
740 " char buf[BUFLEN];\n"
745 #: build/C/man3/getgrent_r.3:172
750 " i = getgrent_r(&grp, buf, BUFLEN, &grpp);\n"
753 " printf(\"%s (%d):\", grpp-E<gt>gr_name, grpp-E<gt>gr_gid);\n"
754 " for (i = 0; ; i++) {\n"
755 " if (grpp-E<gt>gr_mem[i] == NULL)\n"
757 " printf(\" %s\", grpp-E<gt>gr_mem[i]);\n"
759 " printf(\"\\en\");\n"
762 " exit(EXIT_SUCCESS);\n"
767 #: build/C/man3/getgrent_r.3:189
769 "B<fgetgrent>(3), B<getgrent>(3), B<getgrgid>(3), B<getgrnam>(3), "
770 "B<putgrent>(3), B<group>(5)"
774 #: build/C/man3/getgrnam.3:31
780 #: build/C/man3/getgrnam.3:34
781 msgid "getgrnam, getgrnam_r, getgrgid, getgrgid_r - get group file entry"
785 #: build/C/man3/getgrnam.3:40
787 msgid "B<struct group *getgrnam(const char *>I<name>B<);>\n"
791 #: build/C/man3/getgrnam.3:42
793 msgid "B<struct group *getgrgid(gid_t >I<gid>B<);>\n"
797 #: build/C/man3/getgrnam.3:44
799 msgid "B<int getgrnam_r(const char *>I<name>B<, struct group *>I<grp>B<,>\n"
803 #: build/C/man3/getgrnam.3:46 build/C/man3/getgrnam.3:50
806 "B< char *>I<buf>B<, size_t >I<buflen>B<, struct group "
807 "**>I<result>B<);>\n"
811 #: build/C/man3/getgrnam.3:48
813 msgid "B<int getgrgid_r(gid_t >I<gid>B<, struct group *>I<grp>B<,>\n"
817 #: build/C/man3/getgrnam.3:60
818 msgid "B<getgrnam_r>(), B<getgrgid_r>():"
822 #: build/C/man3/getgrnam.3:63 build/C/man3/getpwnam.3:67
824 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
829 #: build/C/man3/getgrnam.3:75
831 "The B<getgrnam>() function returns a pointer to a structure containing the "
832 "broken-out fields of the record in the group database (e.g., the local group "
833 "file I</etc/group>, NIS, and LDAP) that matches the group name I<name>."
837 #: build/C/man3/getgrnam.3:82
839 "The B<getgrgid>() function returns a pointer to a structure containing the "
840 "broken-out fields of the record in the group database that matches the group "
845 #: build/C/man3/getgrnam.3:121
847 "The B<getgrnam_r>() and B<getgrgid_r>() functions obtain the same "
848 "information as B<getgrnam>() and B<getgrgid>(), but store the retrieved "
849 "I<group> structure in the space pointed to by I<grp>. The string fields "
850 "pointed to by the members of the I<group> structure are stored in the buffer "
851 "I<buf> of size I<buflen>. A pointer to the result (in case of success) or "
852 "NULL (in case no entry was found or an error occurred) is stored in "
857 #: build/C/man3/getgrnam.3:128
859 "The maximum needed size for I<buf> can be found using B<sysconf>(3) with "
860 "the argument B<_SC_GETGR_R_SIZE_MAX>."
864 #: build/C/man3/getgrnam.3:143
866 "The B<getgrnam>() and B<getgrgid>() functions return a pointer to a "
867 "I<group> structure, or NULL if the matching entry is not found or an error "
868 "occurs. If an error occurs, I<errno> is set appropriately. If one wants to "
869 "check I<errno> after the call, it should be set to zero before the call."
873 #: build/C/man3/getgrnam.3:152
875 "The return value may point to a static area, and may be overwritten by "
876 "subsequent calls to B<getgrent>(3), B<getgrgid>(), or B<getgrnam>(). (Do "
877 "not pass the returned pointer to B<free>(3).)"
881 #: build/C/man3/getgrnam.3:166
883 "On success, B<getgrnam_r>() and B<getgrgid_r>() return zero, and set "
884 "I<*result> to I<grp>. If no matching group record was found, these "
885 "functions return 0 and store NULL in I<*result>. In case of error, an error "
886 "number is returned, and NULL is stored in I<*result>."
890 #: build/C/man3/getgrnam.3:167 build/C/man3/getpwnam.3:174
892 msgid "B<0> or B<ENOENT> or B<ESRCH> or B<EBADF> or B<EPERM> or ... "
896 #: build/C/man3/getgrnam.3:174
897 msgid "The given I<name> or I<gid> was not found."
901 #: build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:135 build/C/man3/getpwnam.3:192
903 "The maximum number (B<OPEN_MAX>) of files was open already in the calling "
908 #: build/C/man3/getgrnam.3:188 build/C/man3/getpwent.3:138 build/C/man3/getpwnam.3:195
909 msgid "The maximum number of files was open already in the system."
913 #. AIX 5.1 - gives ESRCH
914 #. OSF1 4.0g - gives EWOULDBLOCK
915 #. libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
916 #. glibc since version 2.7 - give 0
917 #. FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
918 #. SunOS 5.8 - gives EBADF
919 #. Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
921 #: build/C/man3/getgrnam.3:225
923 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001. It "
924 "does not call \"not found\" an error, hence does not specify what value "
925 "I<errno> might have in this situation. But that makes it impossible to "
926 "recognize errors. One might argue that according to POSIX I<errno> should "
927 "be left unchanged if an entry is not found. Experiments on various "
928 "UNIX-like systems shows that lots of different values occur in this "
929 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
933 #: build/C/man3/getgrnam.3:232
935 "B<endgrent>(3), B<fgetgrent>(3), B<getgrent>(3), B<getpwnam>(3), "
936 "B<setgrent>(3), B<group>(5)"
940 #: build/C/man3/getgrouplist.3:27
946 #: build/C/man3/getgrouplist.3:27
952 #: build/C/man3/getgrouplist.3:30
953 msgid "getgrouplist - get list of groups to which a user belongs"
957 #: build/C/man3/getgrouplist.3:32 build/C/man3/putgrent.3:11
958 msgid "B<#include E<lt>grp.hE<gt>>"
962 #: build/C/man3/getgrouplist.3:34
963 msgid "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>"
967 #: build/C/man3/getgrouplist.3:36
968 msgid "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>"
972 #: build/C/man3/getgrouplist.3:44
973 msgid "B<getgrouplist>(): _BSD_SOURCE"
977 #: build/C/man3/getgrouplist.3:56
979 "The B<getgrouplist>() function scans the group database (see B<group>(5)) "
980 "to obtain the list of groups that I<user> belongs to. Up to I<*ngroups> of "
981 "these groups are returned in the array I<groups>."
985 #: build/C/man3/getgrouplist.3:66
987 "If it was not among the groups defined for I<user> in the group database, "
988 "then I<group> is included in the list of groups returned by "
989 "B<getgrouplist>(); typically this argument is specified as the group ID from "
990 "the password record for I<user>."
994 #: build/C/man3/getgrouplist.3:76
996 "The I<ngroups> argument is a value-result argument: on return it always "
997 "contains the number of groups found for I<user>, including I<group>; this "
998 "value may be greater than the number of groups stored in I<groups>."
1002 #: build/C/man3/getgrouplist.3:84
1004 "If the number of groups of which I<user> is a member is less than or equal "
1005 "to I<*ngroups>, then the value I<*ngroups> is returned."
1009 #: build/C/man3/getgrouplist.3:94
1011 "If the user is a member of more than I<*ngroups> groups, then "
1012 "B<getgrouplist>() returns -1. In this case the value returned in "
1013 "I<*ngroups> can be used to resize the buffer passed to a further call "
1014 "B<getgrouplist>()."
1018 #: build/C/man3/getgrouplist.3:94
1024 #: build/C/man3/getgrouplist.3:96
1025 msgid "This function is present since glibc 2.2.4."
1029 #: build/C/man3/getgrouplist.3:98
1030 msgid "This function is nonstandard; it appears on most BSDs."
1034 #: build/C/man3/getgrouplist.3:98 build/C/man3/getpw.3:96 build/C/man5/group.5:54
1040 #: build/C/man3/getgrouplist.3:107
1042 "In glibc versions before 2.3.3, the implementation of this function contains "
1043 "a buffer-overrun bug: it returns the complete list of groups for I<user> in "
1044 "the array I<groups>, even when the number of groups exceeds I<*ngroups>."
1048 #: build/C/man3/getgrouplist.3:116
1050 "The program below displays the group list for the user named in its first "
1051 "command-line argument. The second command-line argument specifies the "
1052 "I<ngroups> value to be supplied to B<getgrouplist>(). The following shell "
1053 "session shows examples of the use of this program:"
1057 #: build/C/man3/getgrouplist.3:126
1060 "$B< ./a.out cecilia 0>\n"
1061 "getgrouplist() returned -1; ngroups = 3\n"
1062 "$B< ./a.out cecilia 3>\n"
1070 #: build/C/man3/getgrouplist.3:128
1072 msgid "Program source"
1076 #: build/C/man3/getgrouplist.3:135
1079 "#include E<lt>stdio.hE<gt>\n"
1080 "#include E<lt>stdlib.hE<gt>\n"
1081 "#include E<lt>grp.hE<gt>\n"
1082 "#include E<lt>pwd.hE<gt>\n"
1086 #: build/C/man3/getgrouplist.3:143
1090 "main(int argc, char *argv[])\n"
1092 " int j, ngroups;\n"
1094 " struct passwd *pw;\n"
1095 " struct group *gr;\n"
1099 #: build/C/man3/getgrouplist.3:148
1102 " if (argc != 3) {\n"
1103 " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", "
1105 " exit(EXIT_FAILURE);\n"
1110 #: build/C/man3/getgrouplist.3:150
1112 msgid " ngroups = atoi(argv[2]);\n"
1116 #: build/C/man3/getgrouplist.3:156
1119 " groups = malloc(ngroups * sizeof (gid_t));\n"
1120 " if (groups == NULL) {\n"
1121 " perror(\"malloc\");\n"
1122 " exit(EXIT_FAILURE);\n"
1127 #: build/C/man3/getgrouplist.3:158
1129 msgid " /* Fetch passwd structure (contains first group ID for user) */\n"
1133 #: build/C/man3/getgrouplist.3:164
1136 " pw = getpwnam(argv[1]);\n"
1137 " if (pw == NULL) {\n"
1138 " perror(\"getpwnam\");\n"
1139 " exit(EXIT_SUCCESS);\n"
1144 #: build/C/man3/getgrouplist.3:166
1146 msgid " /* Retrieve group list */\n"
1150 #: build/C/man3/getgrouplist.3:172
1153 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
1154 " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\en\",\n"
1156 "\texit(EXIT_FAILURE);\n"
1161 #: build/C/man3/getgrouplist.3:174
1163 msgid " /* Display list of retrieved groups, along with group names */\n"
1167 #: build/C/man3/getgrouplist.3:183
1170 " fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
1171 " for (j = 0; j E<lt> ngroups; j++) {\n"
1172 " printf(\"%d\", groups[j]);\n"
1173 " gr = getgrgid(groups[j]);\n"
1174 " if (gr != NULL)\n"
1175 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
1176 " printf(\"\\en\");\n"
1181 #: build/C/man3/getgrouplist.3:186
1184 " exit(EXIT_SUCCESS);\n"
1189 #: build/C/man3/getgrouplist.3:193
1190 msgid "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group>(5), B<passwd>(5)"
1194 #: build/C/man3/getpw.3:30
1200 #: build/C/man3/getpw.3:33
1201 msgid "getpw - Re-construct password line entry"
1205 #: build/C/man3/getpw.3:38
1208 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
1209 "B<#include E<lt>sys/types.hE<gt>>\n"
1210 "B<#include E<lt>pwd.hE<gt>>\n"
1214 #: build/C/man3/getpw.3:40
1216 msgid "B<int getpw(uid_t >I<uid>B<, char *>I<buf>B<);>\n"
1220 #: build/C/man3/getpw.3:47
1222 "The B<getpw>() function reconstructs the password line entry for the given "
1223 "user ID I<uid> in the buffer I<buf>. The returned buffer contains a line of "
1228 #: build/C/man3/getpw.3:50
1229 msgid "B<name:passwd:uid:gid:gecos:dir:shell>"
1233 #: build/C/man3/getpw.3:65 build/C/man3/getpwent.3:96 build/C/man3/getpwnam.3:100
1237 " char *pw_name; /* username */\n"
1238 " char *pw_passwd; /* user password */\n"
1239 " uid_t pw_uid; /* user ID */\n"
1240 " gid_t pw_gid; /* group ID */\n"
1241 " char *pw_gecos; /* user information */\n"
1242 " char *pw_dir; /* home directory */\n"
1243 " char *pw_shell; /* shell program */\n"
1248 #: build/C/man3/getpw.3:70 build/C/man3/getpwent.3:101 build/C/man3/getpwent_r.3:83
1249 msgid "For more information about the fields of this structure, see B<passwd>(5)."
1253 #: build/C/man3/getpw.3:76
1255 "The B<getpw>() function returns 0 on success; on error, it returns -1, and "
1256 "I<errno> is set to indicate the error."
1260 #: build/C/man3/getpw.3:77 build/C/man3/putpwent.3:74
1266 #: build/C/man3/getpw.3:81
1267 msgid "I<buf> is NULL."
1271 #: build/C/man3/getpw.3:85
1272 msgid "No user corresponding to I<uid>."
1276 #: build/C/man3/getpw.3:96
1281 #: build/C/man3/getpw.3:103
1283 "The B<getpw>() function is dangerous as it may overflow the provided buffer "
1284 "I<buf>. It is obsoleted by B<getpwuid>(3)."
1288 #: build/C/man3/getpw.3:112
1290 "B<endpwent>(3), B<fgetpwent>(3), B<getpwent>(3), B<getpwnam>(3), "
1291 "B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1295 #: build/C/man3/getpwent.3:31
1301 #: build/C/man3/getpwent.3:34
1302 msgid "getpwent, setpwent, endpwent - get password file entry"
1306 #: build/C/man3/getpwent.3:38 build/C/man3/getpwnam.3:42
1309 "B<#include E<lt>sys/types.hE<gt>>\n"
1310 "B<#include E<lt>pwd.hE<gt>>\n"
1314 #: build/C/man3/getpwent.3:40
1316 msgid "B<struct passwd *getpwent(void);>\n"
1320 #: build/C/man3/getpwent.3:42
1322 msgid "B<void setpwent(void);>\n"
1326 #: build/C/man3/getpwent.3:44
1328 msgid "B<void endpwent(void);>\n"
1332 #: build/C/man3/getpwent.3:55
1333 msgid "B<getpwent>(), B<setpwent>(), B<endpwent>():"
1337 #: build/C/man3/getpwent.3:58
1339 "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
1340 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
1344 #: build/C/man3/getpwent.3:72
1346 "The B<getpwent>() function returns a pointer to a structure containing the "
1347 "broken-out fields of a record from the password database (e.g., the local "
1348 "password file I</etc/passwd>, NIS, and LDAP). The first time B<getpwent>() "
1349 "is called, it returns the first entry; thereafter, it returns successive "
1354 #: build/C/man3/getpwent.3:77
1356 "The B<setpwent>() function rewinds to the beginning of the password "
1361 #: build/C/man3/getpwent.3:82
1363 "The B<endpwent>() function is used to close the password database after all "
1364 "processing has been performed."
1368 #: build/C/man3/getpwent.3:114
1370 "The B<getpwent>() function returns a pointer to a I<passwd> structure, or "
1371 "NULL if there are no more entries or an error occurs. If an error occurs, "
1372 "I<errno> is set appropriately. If one wants to check I<errno> after the "
1373 "call, it should be set to zero before the call."
1377 #: build/C/man3/getpwent.3:123
1379 "The return value may point to a static area, and may be overwritten by "
1380 "subsequent calls to B<getpwent>(), B<getpwnam>(3), or B<getpwuid>(3). (Do "
1381 "not pass the returned pointer to B<free>(3).)"
1385 #: build/C/man3/getpwent.3:152 build/C/man3/getpwnam.3:209
1386 msgid "local password database file"
1390 #: build/C/man3/getpwent.3:157 build/C/man3/getpwnam.3:214
1392 "SVr4, 4.3BSD, POSIX.1-2001. The I<pw_gecos> field is not specified in "
1393 "POSIX, but is present on most implementations."
1397 #: build/C/man3/getpwent.3:165
1399 "B<fgetpwent>(3), B<getpw>(3), B<getpwent_r>(3), B<getpwnam>(3), "
1400 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1404 #: build/C/man3/getpwent_r.3:23
1410 #: build/C/man3/getpwent_r.3:26
1411 msgid "getpwent_r, fgetpwent_r - get passwd file entry reentrantly"
1415 #: build/C/man3/getpwent_r.3:29
1417 msgid "B<#include E<lt>pwd.hE<gt>>\n"
1421 #: build/C/man3/getpwent_r.3:31
1423 msgid "B<int getpwent_r(struct passwd *>I<pwbuf>B<, char *>I<buf>B<,>\n"
1427 #: build/C/man3/getpwent_r.3:33
1429 msgid "B< size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1433 #: build/C/man3/getpwent_r.3:35
1436 "B<int fgetpwent_r(FILE *>I<fp>B<, struct passwd *>I<pwbuf>B<, char "
1441 #: build/C/man3/getpwent_r.3:37
1443 msgid "B< size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1447 #: build/C/man3/getpwent_r.3:46
1448 msgid "B<getpwent_r>(), _BSD_SOURCE || _SVID_SOURCE"
1452 #: build/C/man3/getpwent_r.3:49
1453 msgid "B<fgetpwent_r>(): _SVID_SOURCE"
1457 #: build/C/man3/getpwent_r.3:62
1459 "The functions B<getpwent_r>() and B<fgetpwent_r>() are the reentrant "
1460 "versions of B<getpwent>(3) and B<fgetpwent>(3). The former reads the next "
1461 "passwd entry from the stream initialized by B<setpwent>(3). The latter "
1462 "reads the next passwd entry from the stream I<fp>."
1466 #: build/C/man3/getpwent_r.3:78
1470 " char *pw_name; /* username */\n"
1471 " char *pw_passwd; /* user password */\n"
1472 " uid_t pw_uid; /* user ID */\n"
1473 " gid_t pw_gid; /* group ID */\n"
1474 " char *pw_gecos; /* user information */\n"
1475 " char *pw_dir; /* home directory */\n"
1476 " char *pw_shell; /* shell program */\n"
1481 #: build/C/man3/getpwent_r.3:102
1483 "The nonreentrant functions return a pointer to static storage, where this "
1484 "static storage contains further pointers to user name, password, gecos "
1485 "field, home directory and shell. The reentrant functions described here "
1486 "return all of that in caller-provided buffers. First of all there is the "
1487 "buffer I<pwbuf> that can hold a I<struct passwd>. And next the buffer "
1488 "I<buf> of size I<buflen> that can hold additional strings. The result of "
1489 "these functions, the I<struct passwd> read from the stream, is stored in the "
1490 "provided buffer I<*pwbuf>, and a pointer to this I<struct passwd> is "
1491 "returned in I<*pwbufp>."
1495 #: build/C/man3/getpwent_r.3:109
1497 "On success, these functions return 0 and I<*pwbufp> is a pointer to the "
1498 "I<struct passwd>. On error, these functions return an error value and "
1499 "I<*pwbufp> is NULL."
1503 #: build/C/man3/getpwent_r.3:127
1507 "getpwent_r(struct passwd *pwd, char *buf, int buflen);\n"
1511 #: build/C/man3/getpwent_r.3:137
1515 "getpwent_r(struct passwd *pwd, char *buf, int buflen,\n"
1520 #: build/C/man3/getpwent_r.3:144
1522 "The function B<getpwent_r>() is not really reentrant since it shares the "
1523 "reading position in the stream with all other threads."
1527 #: build/C/man3/getpwent_r.3:150
1530 "#define _GNU_SOURCE\n"
1531 "#include E<lt>pwd.hE<gt>\n"
1532 "#include E<lt>stdio.hE<gt>\n"
1533 "#define BUFLEN 4096\n"
1537 #: build/C/man3/getpwent_r.3:157
1543 " struct passwd pw, *pwp;\n"
1544 " char buf[BUFLEN];\n"
1549 #: build/C/man3/getpwent_r.3:169
1554 " i = getpwent_r(&pw, buf, BUFLEN, &pwp);\n"
1557 " printf(\"%s (%d)\\etHOME %s\\etSHELL %s\\en\", pwp-E<gt>pw_name,\n"
1558 " pwp-E<gt>pw_uid, pwp-E<gt>pw_dir, pwp-E<gt>pw_shell);\n"
1561 " exit(EXIT_SUCCESS);\n"
1566 #: build/C/man3/getpwent_r.3:187
1568 "B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), B<getpwnam>(3), "
1569 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1573 #: build/C/man3/getpwnam.3:35
1579 #: build/C/man3/getpwnam.3:38
1580 msgid "getpwnam, getpwnam_r, getpwuid, getpwuid_r - get password file entry"
1584 #: build/C/man3/getpwnam.3:44
1586 msgid "B<struct passwd *getpwnam(const char *>I<name>B<);>\n"
1590 #: build/C/man3/getpwnam.3:46
1592 msgid "B<struct passwd *getpwuid(uid_t >I<uid>B<);>\n"
1596 #: build/C/man3/getpwnam.3:48
1598 msgid "B<int getpwnam_r(const char *>I<name>B<, struct passwd *>I<pwd>B<,>\n"
1602 #: build/C/man3/getpwnam.3:50 build/C/man3/getpwnam.3:54
1605 "B< char *>I<buf>B<, size_t >I<buflen>B<, struct passwd "
1606 "**>I<result>B<);>\n"
1610 #: build/C/man3/getpwnam.3:52
1612 msgid "B<int getpwuid_r(uid_t >I<uid>B<, struct passwd *>I<pwd>B<,>\n"
1616 #: build/C/man3/getpwnam.3:64
1617 msgid "B<getpwnam_r>(), B<getpwuid_r>():"
1621 #: build/C/man3/getpwnam.3:79
1623 "The B<getpwnam>() function returns a pointer to a structure containing the "
1624 "broken-out fields of the record in the password database (e.g., the local "
1625 "password file I</etc/passwd>, NIS, and LDAP) that matches the username "
1630 #: build/C/man3/getpwnam.3:86
1632 "The B<getpwuid>() function returns a pointer to a structure containing the "
1633 "broken-out fields of the record in the password database that matches the "
1638 #: build/C/man3/getpwnam.3:106
1639 msgid "See B<passwd>(5) for more information about these fields."
1643 #: build/C/man3/getpwnam.3:128
1645 "The B<getpwnam_r>() and B<getpwuid_r>() functions obtain the same "
1646 "information as B<getpwnam>() and B<getpwuid>(), but store the retrieved "
1647 "I<passwd> structure in the space pointed to by I<pwd>. The string fields "
1648 "pointed to by the members of the I<passwd> structure are stored in the "
1649 "buffer I<buf> of size I<buflen>. A pointer to the result (in case of "
1650 "success) or NULL (in case no entry was found or an error occurred) is stored "
1655 #: build/C/man3/getpwnam.3:135
1657 "The maximum size needed for I<buf> can be found using B<sysconf>(3) with "
1658 "the argument B<_SC_GETPW_R_SIZE_MAX>."
1662 #: build/C/man3/getpwnam.3:150
1664 "The B<getpwnam>() and B<getpwuid>() functions return a pointer to a "
1665 "I<passwd> structure, or NULL if the matching entry is not found or an error "
1666 "occurs. If an error occurs, I<errno> is set appropriately. If one wants to "
1667 "check I<errno> after the call, it should be set to zero before the call."
1671 #: build/C/man3/getpwnam.3:159
1673 "The return value may point to a static area, and may be overwritten by "
1674 "subsequent calls to B<getpwent>(3), B<getpwnam>(), or B<getpwuid>(). (Do "
1675 "not pass the returned pointer to B<free>(3).)"
1679 #: build/C/man3/getpwnam.3:173
1681 "On success, B<getpwnam_r>() and B<getpwuid_r>() return zero, and set "
1682 "I<*result> to I<pwd>. If no matching password record was found, these "
1683 "functions return 0 and store NULL in I<*result>. In case of error, an error "
1684 "number is returned, and NULL is stored in I<*result>."
1688 #: build/C/man3/getpwnam.3:181
1689 msgid "The given I<name> or I<uid> was not found."
1693 #. AIX 5.1 - gives ESRCH
1694 #. OSF1 4.0g - gives EWOULDBLOCK
1695 #. libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
1696 #. glibc since version 2.7 - give 0
1697 #. FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
1698 #. SunOS 5.8 - gives EBADF
1699 #. Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
1701 #: build/C/man3/getpwnam.3:235
1703 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001. It "
1704 "does not call \"not found\" an error, and hence does not specify what value "
1705 "I<errno> might have in this situation. But that makes it impossible to "
1706 "recognize errors. One might argue that according to POSIX I<errno> should "
1707 "be left unchanged if an entry is not found. Experiments on various "
1708 "UNIX-like systems show that lots of different values occur in this "
1709 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
1713 #: build/C/man3/getpwnam.3:253
1715 "The I<pw_dir> field contains the name of the initial working directory of "
1716 "the user. Login programs use the value of this field to initialize the "
1717 "B<HOME> environment variable for the login shell. An application that wants "
1718 "to determine its user's home directory should inspect the value of B<HOME> "
1719 "(rather than the value I<getpwuid(getuid())-E<gt>pw_dir>) since this allows "
1720 "the user to modify their notion of \"the home directory\" during a login "
1721 "session. To determine the (initial) home directory of another user, it is "
1722 "necessary to use I<getpwnam(\"username\")-E<gt>pw_dir> or similar."
1726 #: build/C/man3/getpwnam.3:258
1728 "The program below demonstrates the use of B<getpwnam_r>() to find the full "
1729 "username and user ID for the username supplied as a command-line argument."
1733 #: build/C/man3/getpwnam.3:265
1736 "#include E<lt>pwd.hE<gt>\n"
1737 "#include E<lt>stdio.hE<gt>\n"
1738 "#include E<lt>stdlib.hE<gt>\n"
1739 "#include E<lt>unistd.hE<gt>\n"
1740 "#include E<lt>errno.hE<gt>\n"
1744 #: build/C/man3/getpwnam.3:274
1748 "main(int argc, char *argv[])\n"
1750 " struct passwd pwd;\n"
1751 " struct passwd *result;\n"
1753 " size_t bufsize;\n"
1758 #: build/C/man3/getpwnam.3:279
1761 " if (argc != 2) {\n"
1762 " fprintf(stderr, \"Usage: %s username\\en\", argv[0]);\n"
1763 " exit(EXIT_FAILURE);\n"
1768 #: build/C/man3/getpwnam.3:283
1771 " bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);\n"
1772 " if (bufsize == -1) /* Value was indeterminate */\n"
1773 " bufsize = 16384; /* Should be more than enough */\n"
1777 #: build/C/man3/getpwnam.3:289
1780 " buf = malloc(bufsize);\n"
1781 " if (buf == NULL) {\n"
1782 " perror(\"malloc\");\n"
1783 " exit(EXIT_FAILURE);\n"
1788 #: build/C/man3/getpwnam.3:300
1791 " s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);\n"
1792 " if (result == NULL) {\n"
1794 " printf(\"Not found\\en\");\n"
1797 " perror(\"getpwnam_r\");\n"
1799 " exit(EXIT_FAILURE);\n"
1804 #: build/C/man3/getpwnam.3:304
1807 " printf(\"Name: %s; UID: %ld\\en\", pwd.pw_gecos, (long) pwd.pw_uid);\n"
1808 " exit(EXIT_SUCCESS);\n"
1813 #: build/C/man3/getpwnam.3:315
1815 "B<endpwent>(3), B<fgetpwent>(3), B<getgrnam>(3), B<getpw>(3), "
1816 "B<getpwent>(3), B<getspnam>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1820 #: build/C/man3/getspnam.3:6
1826 #: build/C/man3/getspnam.3:6
1832 #: build/C/man3/getspnam.3:11
1834 "getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, fgetspent, "
1835 "fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf - get "
1836 "shadow password file entry"
1840 #: build/C/man3/getspnam.3:14
1842 msgid "/* General shadow password file API */\n"
1846 #: build/C/man3/getspnam.3:16 build/C/man3/getspnam.3:38
1848 msgid "B<#include E<lt>shadow.hE<gt>>\n"
1852 #: build/C/man3/getspnam.3:18
1854 msgid "B<struct spwd *getspnam(const char *>I<name>B<);>\n"
1858 #: build/C/man3/getspnam.3:20
1860 msgid "B<struct spwd *getspent(void);>\n"
1864 #: build/C/man3/getspnam.3:22
1866 msgid "B<void setspent(void);>\n"
1870 #: build/C/man3/getspnam.3:24
1872 msgid "B<void endspent(void);>\n"
1876 #: build/C/man3/getspnam.3:26
1878 msgid "B<struct spwd *fgetspent(FILE *>I<fp>B<);>\n"
1882 #: build/C/man3/getspnam.3:28
1884 msgid "B<struct spwd *sgetspent(const char *>I<s>B<);>\n"
1888 #: build/C/man3/getspnam.3:30
1890 msgid "B<int putspent(struct spwd *>I<p>B<, FILE *>I<fp>B<);>\n"
1894 #: build/C/man3/getspnam.3:32
1896 msgid "B<int lckpwdf(void);>\n"
1900 #: build/C/man3/getspnam.3:34
1902 msgid "B<int ulckpwdf(void);>\n"
1906 #: build/C/man3/getspnam.3:36
1908 msgid "/* GNU extension */\n"
1912 #: build/C/man3/getspnam.3:40
1914 msgid "B<int getspent_r(struct spwd *>I<spbuf>B<,>\n"
1918 #: build/C/man3/getspnam.3:42 build/C/man3/getspnam.3:46 build/C/man3/getspnam.3:50 build/C/man3/getspnam.3:54
1921 "B< char *>I<buf>B<, size_t >I<buflen>B<, struct spwd "
1922 "**>I<spbufp>B<);>\n"
1926 #: build/C/man3/getspnam.3:44
1928 msgid "B<int getspnam_r(const char *>I<name>B<, struct spwd *>I<spbuf>B<,>\n"
1932 #: build/C/man3/getspnam.3:48
1934 msgid "B<int fgetspent_r(FILE *>I<fp>B<, struct spwd *>I<spbuf>B<,>\n"
1938 #: build/C/man3/getspnam.3:52
1940 msgid "B<int sgetspent_r(const char *>I<s>B<, struct spwd *>I<spbuf>B<,>\n"
1944 #: build/C/man3/getspnam.3:66
1945 msgid "B<getspent_r>(), B<getspnam_r>(), B<fgetspent_r>(), B<sgetspent_r>():"
1949 #: build/C/man3/getspnam.3:68
1950 msgid "_BSD_SOURCE || _SVID_SOURCE"
1954 #: build/C/man3/getspnam.3:82
1956 "Long ago it was considered safe to have encrypted passwords openly visible "
1957 "in the password file. When computers got faster and people got more "
1958 "security-conscious, this was no longer acceptable. Julianne Frances Haugh "
1959 "implemented the shadow password suite that keeps the encrypted passwords in "
1960 "the shadow password database (e.g., the local shadow password file "
1961 "I</etc/shadow>, NIS, and LDAP), readable only by root."
1964 #. FIXME I've commented out the following for the
1965 #. moment. The relationship between PAM and nsswitch.conf needs
1966 #. to be clearly documented in one place, which is pointed to by
1967 #. the pages for the user, group, and shadow password functions.
1970 #. This shadow password setup has been superseded by PAM
1971 #. (pluggable authentication modules), and the file
1972 #. .I /etc/nsswitch.conf
1973 #. now describes the sources to be used.
1975 #: build/C/man3/getspnam.3:99
1977 "The functions described below resemble those for the traditional password "
1978 "database (e.g., see B<getpwnam>(3) and B<getpwent>(3))."
1982 #: build/C/man3/getspnam.3:106
1984 "The B<getspnam>() function returns a pointer to a structure containing the "
1985 "broken-out fields of the record in the shadow password database that matches "
1986 "the username I<name>."
1989 #. some systems require a call of setspent() before the first getspent()
1992 #: build/C/man3/getspnam.3:118
1994 "The B<getspent>() function returns a pointer to the next entry in the "
1995 "shadow password database. The position in the input stream is initialized "
1996 "by B<setspent>(). When done reading, the program may call B<endspent>() so "
1997 "that resources can be deallocated."
2001 #: build/C/man3/getspnam.3:125
2003 "The B<fgetspent>() function is similar to B<getspent>() but uses the "
2004 "supplied stream instead of the one implicitly opened by B<setspent>()."
2008 #: build/C/man3/getspnam.3:132
2010 "The B<sgetspent>() function parses the supplied string I<s> into a struct "
2015 #: build/C/man3/getspnam.3:142
2017 "The B<putspent>() function writes the contents of the supplied struct "
2018 "I<spwd> I<*p> as a text line in the shadow password file format to the "
2019 "stream I<fp>. String entries with value NULL and numerical entries with "
2020 "value -1 are written as an empty string."
2024 #: build/C/man3/getspnam.3:157
2026 "The B<lckpwdf>() function is intended to protect against multiple "
2027 "simultaneous accesses of the shadow password database. It tries to acquire "
2028 "a lock, and returns 0 on success, or -1 on failure (lock not obtained within "
2029 "15 seconds). The B<ulckpwdf>() function releases the lock again. Note "
2030 "that there is no protection against direct access of the shadow password "
2031 "file. Only programs that use B<lckpwdf>() will notice the lock."
2035 #. SUN doesn't have sgetspent()
2037 #: build/C/man3/getspnam.3:162
2039 "These were the functions that formed the original shadow API. They are "
2044 #: build/C/man3/getspnam.3:162
2046 msgid "Reentrant versions"
2050 #: build/C/man3/getspnam.3:179
2052 "Analogous to the reentrant functions for the password database, glibc also "
2053 "has reentrant functions for the shadow password database. The "
2054 "B<getspnam_r>() function is like B<getspnam>() but stores the retrieved "
2055 "shadow password structure in the space pointed to by I<spbuf>. This shadow "
2056 "password structure contains pointers to strings, and these strings are "
2057 "stored in the buffer I<buf> of size I<buflen>. A pointer to the result (in "
2058 "case of success) or NULL (in case no entry was found or an error occurred) "
2059 "is stored in I<*spbufp>."
2063 #: build/C/man3/getspnam.3:186
2065 "The functions B<getspent_r>(), B<fgetspent_r>(), and B<sgetspent_r>() are "
2066 "similarly analogous to their nonreentrant counterparts."
2069 #. SUN doesn't have sgetspent_r()
2071 #: build/C/man3/getspnam.3:190
2073 "Some non-glibc systems also have functions with these names, often with "
2074 "different prototypes."
2078 #: build/C/man3/getspnam.3:190
2084 #: build/C/man3/getspnam.3:192
2086 "The shadow password structure is defined in I<E<lt>shadow.hE<gt>> as "
2091 #: build/C/man3/getspnam.3:210
2095 " char *sp_namp; /* Login name */\n"
2096 " char *sp_pwdp; /* Encrypted password */\n"
2097 " long sp_lstchg; /* Date of last change (measured\n"
2098 " in days since 1970-01-01 00:00:00 +0000 (UTC)) "
2100 " long sp_min; /* Min # of days between changes */\n"
2101 " long sp_max; /* Max # of days between changes */\n"
2102 " long sp_warn; /* # of days before password expires\n"
2103 " to warn user to change it */\n"
2104 " long sp_inact; /* # of days after password expires\n"
2105 " until account is disabled */\n"
2106 " long sp_expire; /* Date when account expires (measured\n"
2107 " in days since 1970-01-01 00:00:00 +0000 (UTC)) "
2109 " unsigned long sp_flag; /* Reserved */\n"
2114 #: build/C/man3/getspnam.3:217
2116 "The functions that return a pointer return NULL if no more entries are "
2117 "available or if an error occurs during processing. The functions which have "
2118 "I<int> as the return value return 0 for success and -1 for failure."
2122 #: build/C/man3/getspnam.3:220
2124 "For the nonreentrant functions, the return value may point to static area, "
2125 "and may be overwritten by subsequent calls to these functions."
2129 #: build/C/man3/getspnam.3:223
2131 "The reentrant functions return zero on success. In case of error, an error "
2132 "number is returned."
2136 #: build/C/man3/getspnam.3:227
2137 msgid "Supplied buffer is too small."
2141 #: build/C/man3/getspnam.3:228
2143 msgid "I</etc/shadow>"
2147 #: build/C/man3/getspnam.3:231
2148 msgid "local shadow password database file"
2152 #: build/C/man3/getspnam.3:231
2154 msgid "I</etc/.pwd.lock>"
2158 #: build/C/man3/getspnam.3:234
2163 #: build/C/man3/getspnam.3:240
2165 "The include file I<E<lt>paths.hE<gt>> defines the constant B<_PATH_SHADOW> "
2166 "to the pathname of the shadow password file."
2170 #: build/C/man3/getspnam.3:244
2172 "The shadow password database and its associated API are not specified in "
2173 "POSIX.1-2001. However, many other systems provide a similar API."
2177 #: build/C/man3/getspnam.3:249
2178 msgid "B<getgrnam>(3), B<getpwnam>(3), B<getpwnam_r>(3), B<shadow>(5)"
2182 #: build/C/man5/group.5:25
2188 #: build/C/man5/group.5:28
2189 msgid "group - user group file"
2193 #: build/C/man5/group.5:33
2195 "The I</etc/group> file is a text file that defines the groups on the "
2196 "system. There is one entry per line, with the following format:"
2200 #: build/C/man5/group.5:36
2201 msgid "group_name:password:GID:user_list"
2205 #: build/C/man5/group.5:39
2206 msgid "The fields are as follows:"
2210 #: build/C/man5/group.5:39
2212 msgid "I<group_name>"
2216 #: build/C/man5/group.5:42
2217 msgid "the name of the group."
2221 #: build/C/man5/group.5:42 build/C/man5/passwd.5:75
2227 #: build/C/man5/group.5:46
2229 "the (encrypted) group password. If this field is empty, no password is "
2234 #: build/C/man5/group.5:46 build/C/man5/passwd.5:84
2240 #: build/C/man5/group.5:49
2241 msgid "the numeric group ID."
2245 #: build/C/man5/group.5:49
2247 msgid "I<user_list>"
2251 #: build/C/man5/group.5:52
2252 msgid "a list of the usernames that are members of this group, separated by commas."
2256 #: build/C/man5/group.5:54
2261 #: build/C/man5/group.5:60
2263 "As the 4.2BSD B<initgroups>(3) man page says: No-one seems to keep "
2264 "I</etc/group> up-to-date."
2268 #: build/C/man5/group.5:66
2269 msgid "B<login>(1), B<newgrp>(1), B<getgrent>(3), B<getgrnam>(3), B<passwd>(5)"
2273 #: build/C/man3/initgroups.3:30
2279 #: build/C/man3/initgroups.3:30 build/C/man3/putpwent.3:28
2285 #: build/C/man3/initgroups.3:33
2286 msgid "initgroups - initialize the supplementary group access list"
2290 #: build/C/man3/initgroups.3:39
2292 msgid "B<int initgroups(const char *>I<user>B<, gid_t >I<group>B<);>\n"
2296 #: build/C/man3/initgroups.3:48
2297 msgid "B<initgroups>(): _BSD_SOURCE"
2301 #: build/C/man3/initgroups.3:56
2303 "The B<initgroups>() function initializes the group access list by reading "
2304 "the group database I</etc/group> and using all groups of which I<user> is a "
2305 "member. The additional group I<group> is also added to the list."
2309 #: build/C/man3/initgroups.3:60
2310 msgid "The I<user> argument must be non-NULL."
2314 #: build/C/man3/initgroups.3:67
2316 "The B<initgroups>() function returns 0 on success. On error, -1 is "
2317 "returned, and I<errno> is set appropriately."
2321 #: build/C/man3/initgroups.3:71
2322 msgid "Insufficient memory to allocate group information structure."
2326 #: build/C/man3/initgroups.3:71
2332 #: build/C/man3/initgroups.3:76
2334 "The calling process has insufficient privilege. See the underlying system "
2335 "call B<setgroups>(2)."
2339 #: build/C/man3/initgroups.3:79
2341 msgid "I</etc/group>\t\tgroup database file\n"
2345 #: build/C/man3/initgroups.3:82
2346 msgid "SVr4, 4.3BSD."
2350 #: build/C/man3/initgroups.3:86
2351 msgid "B<getgroups>(2), B<setgroups>(2), B<credentials>(7)"
2355 #: build/C/man5/passwd.5:29
2361 #: build/C/man5/passwd.5:29
2367 #: build/C/man5/passwd.5:32
2368 msgid "passwd - password file"
2372 #: build/C/man5/passwd.5:40
2374 "The I</etc/passwd> file is a text file that describes user login accounts "
2375 "for the system. It should have read permission allowed for all users (many "
2376 "utilities, like B<ls>(1) use it to map user IDs to usernames), but write "
2377 "access only for the superuser."
2381 #: build/C/man5/passwd.5:52
2383 "In the good old days there was no great problem with this general read "
2384 "permission. Everybody could read the encrypted passwords, but the hardware "
2385 "was too slow to crack a well-chosen password, and moreover the basic "
2386 "assumption used to be that of a friendly user-community. These days many "
2387 "people run some version of the shadow password suite, where I</etc/passwd> "
2388 "has an \\(aqx\\(aq character in the password field, and the encrypted "
2389 "passwords are in I</etc/shadow>, which is readable by the superuser only."
2393 #: build/C/man5/passwd.5:58
2395 "Regardless of whether shadow passwords are used, many system administrators "
2396 "use an asterisk (*) in the encrypted password field to make sure that this "
2397 "user can not authenticate him- or herself using a password. (But see NOTES "
2402 #: build/C/man5/passwd.5:63
2404 "If you create a new login, first put an asterisk (*) in the password field, "
2405 "then use B<passwd>(1) to set it."
2409 #: build/C/man5/passwd.5:65
2410 msgid "Each line of the file describes a single user, and has the following format:"
2414 #: build/C/man5/passwd.5:68
2415 msgid "account:password:UID:GID:GECOS:directory:shell"
2419 #: build/C/man5/passwd.5:71
2420 msgid "The field are as follows:"
2424 #: build/C/man5/passwd.5:71
2430 #: build/C/man5/passwd.5:75
2431 msgid "the name of the user on the system. It should not contain capital letters."
2435 #: build/C/man5/passwd.5:81
2437 "the encrypted user password, an asterisk (*), or the letter \\(aqx\\(aq. "
2438 "(See B<pwconv>(8) for an explanation of \\(aqx\\(aq.)"
2442 #: build/C/man5/passwd.5:81
2448 #: build/C/man5/passwd.5:84
2449 msgid "the numeric user ID."
2453 #: build/C/man5/passwd.5:87
2454 msgid "the numeric primary group ID for this user."
2458 #: build/C/man5/passwd.5:87
2464 #: build/C/man5/passwd.5:99
2466 "This field is optional and used only for informational purposes. Usually, "
2467 "it contains the full username. GECOS stands for \"General Electric "
2468 "Comprehensive Operating System\", which was renamed to GCOS when GE's large "
2469 "systems division was sold to Honeywell. Dennis Ritchie has reported: "
2470 "\"Sometimes we sent printer output or batch jobs to the GCOS machine. The "
2471 "gcos field in the password file was a place to stash the information for the "
2472 "$IDENTcard. Not elegant.\""
2476 #: build/C/man5/passwd.5:99
2478 msgid "I<directory>"
2482 #: build/C/man5/passwd.5:104
2483 msgid "the user's B<$HOME> directory."
2487 #: build/C/man5/passwd.5:104
2493 #: build/C/man5/passwd.5:111
2495 "the program to run at login (if empty, use I</bin/sh>). If set to a "
2496 "nonexistent executable, the user will be unable to login through "
2501 #: build/C/man5/passwd.5:117
2503 "If you want to create user groups, there must be an entry in I</etc/group>, "
2504 "or no group will exist."
2508 #: build/C/man5/passwd.5:131
2510 "If the encrypted password is set to an asterisk (*), the user will be unable "
2511 "to login using B<login>(1), but may still login using B<rlogin>(1), run "
2512 "existing processes and initiate new ones through B<rsh>(1), B<cron>(8), "
2513 "B<at>(1), or mail filters, etc. Trying to lock an account by simply "
2514 "changing the shell field yields the same result and additionally allows the "
2519 #: build/C/man5/passwd.5:139
2521 "B<login>(1), B<passwd>(1), B<su>(1), B<getpwent>(3), B<getpwnam>(3), "
2522 "B<group>(5), B<shadow>(5)"
2526 #: build/C/man3/putgrent.3:4
2532 #: build/C/man3/putgrent.3:4 build/C/man3/setaliasent.3:6
2538 #: build/C/man3/putgrent.3:7
2539 msgid "putgrent - write a group database entry to a file"
2543 #: build/C/man3/putgrent.3:9
2544 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
2548 #: build/C/man3/putgrent.3:13
2549 msgid "B<int putgrent(const struct group *>I<grp>B<, FILE *>I<fp>B<);>"
2553 #: build/C/man3/putgrent.3:22
2555 "The B<putgrent>() function is the counterpart for B<fgetgrent>(3). The "
2556 "function writes the content of the provided I<struct group> into the file "
2557 "pointed to by I<fp>. The list of group members must be NULL-terminated or "
2562 #: build/C/man3/putgrent.3:24
2563 msgid "The I<struct group> is defined as follows:"
2567 #: build/C/man3/putgrent.3:33
2571 " char *gr_name; /* group name */\n"
2572 " char *gr_passwd; /* group password */\n"
2573 " gid_t gr_gid; /* group ID */\n"
2574 " char **gr_mem; /* group members */\n"
2579 #: build/C/man3/putgrent.3:37
2580 msgid "The function returns zero on success, and a nonzero value on error."
2584 #: build/C/man3/putgrent.3:39
2585 msgid "This function is a GNU extension."
2589 #: build/C/man3/putgrent.3:43
2590 msgid "B<fgetgrent>(3), B<getgrent>(3), B<group>(5)"
2594 #: build/C/man3/putpwent.3:28
2600 #: build/C/man3/putpwent.3:31
2601 msgid "putpwent - write a password file entry"
2605 #: build/C/man3/putpwent.3:38
2607 msgid "B<int putpwent(const struct passwd *>I<p>B<, FILE *>I<stream>B<);>\n"
2611 #: build/C/man3/putpwent.3:47
2612 msgid "B<putpwent>(): _SVID_SOURCE"
2616 #: build/C/man3/putpwent.3:52
2618 "The B<putpwent>() function writes a password entry from the structure I<p> "
2619 "in the file associated with I<stream>."
2623 #: build/C/man3/putpwent.3:66
2627 " char *pw_name; /* username */\n"
2628 " char *pw_passwd; /* user password */\n"
2629 " uid_t pw_uid; /* user ID */\n"
2630 " gid_t pw_gid; /* group ID */\n"
2631 " char *pw_gecos; /* real name */\n"
2632 " char *pw_dir; /* home directory */\n"
2633 " char *pw_shell; /* shell program */\n"
2638 #: build/C/man3/putpwent.3:73
2639 msgid "The B<putpwent>() function returns 0 on success, or -1 if an error occurs."
2643 #: build/C/man3/putpwent.3:77
2644 msgid "Invalid (NULL) argument given."
2648 #: build/C/man3/putpwent.3:87
2650 "B<endpwent>(3), B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), "
2651 "B<getpwnam>(3), B<getpwuid>(3), B<setpwent>(3)"
2655 #: build/C/man3/setaliasent.3:6
2661 #: build/C/man3/setaliasent.3:10
2663 "setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname, "
2664 "getaliasbyname_r - read an alias entry"
2668 #: build/C/man3/setaliasent.3:12
2669 msgid "B<#include E<lt>aliases.hE<gt>>"
2673 #: build/C/man3/setaliasent.3:14
2674 msgid "B<void setaliasent(void);>"
2678 #: build/C/man3/setaliasent.3:16
2679 msgid "B<void endaliasent(void);>"
2683 #: build/C/man3/setaliasent.3:18
2684 msgid "B<struct aliasent *getaliasent(void);>"
2688 #: build/C/man3/setaliasent.3:20
2689 msgid "B<int getaliasent_r(struct aliasent *>I<result>B<,>"
2693 #: build/C/man3/setaliasent.3:22 build/C/man3/setaliasent.3:28
2694 msgid "B< char *>I<buffer>B<, size_t >I<buflen>B<, struct aliasent **>I<res>B<);>"
2698 #: build/C/man3/setaliasent.3:24
2699 msgid "B<struct aliasent *getaliasbyname(const char *>I<name>B<);>"
2703 #: build/C/man3/setaliasent.3:26
2705 "B<int getaliasbyname_r(const char *>I<name>B<, struct aliasent "
2710 #: build/C/man3/setaliasent.3:33
2712 "One of the databases available with the Name Service Switch (NSS) is the "
2713 "aliases database, that contains mail aliases. (To find out which databases "
2714 "are supported, try I<getent --help>.) Six functions are provided to access "
2715 "the aliases database."
2719 #: build/C/man3/setaliasent.3:40
2721 "The B<getaliasent>() function returns a pointer to a structure containing "
2722 "the group information from the aliases database. The first time it is "
2723 "called it returns the first entry; thereafter, it returns successive "
2728 #: build/C/man3/setaliasent.3:45
2730 "The B<setaliasent>() function rewinds the file pointer to the beginning of "
2731 "the aliases database."
2735 #: build/C/man3/setaliasent.3:49
2736 msgid "The B<endaliasent>() function closes the aliases database."
2740 #: build/C/man3/setaliasent.3:56
2742 "B<getaliasent_r>() is the reentrant version of the previous function. The "
2743 "requested structure is stored via the first argument but the programmer "
2744 "needs to fill the other arguments also. Not providing enough space causes "
2745 "the function to fail."
2749 #: build/C/man3/setaliasent.3:62
2751 "The function B<getaliasbyname>() takes the name argument and searches the "
2752 "aliases database. The entry is returned as a pointer to a I<struct "
2757 #: build/C/man3/setaliasent.3:69
2759 "B<getaliasbyname_r>() is the reentrant version of the previous function. "
2760 "The requested structure is stored via the second argument but the programmer "
2761 "needs to fill the other arguments also. Not providing enough space causes "
2762 "the function to fail."
2766 #: build/C/man3/setaliasent.3:74
2767 msgid "The I<struct aliasent> is defined in I<E<lt>aliases.hE<gt>>:"
2771 #: build/C/man3/setaliasent.3:83
2774 "struct aliasent {\n"
2775 " char *alias_name; /* alias name */\n"
2776 " size_t alias_members_len;\n"
2777 " char **alias_members; /* alias name list */\n"
2778 " int alias_local;\n"
2783 #: build/C/man3/setaliasent.3:91
2785 "The functions B<getaliasent_r>() and B<getaliasbyname_r>() return a "
2786 "nonzero value on error."
2790 #: build/C/man3/setaliasent.3:97
2792 "The default alias database is the file I</etc/aliases>. This can be changed "
2793 "in the I</etc/nsswitch.conf> file."
2797 #: build/C/man3/setaliasent.3:100
2798 msgid "These routines are glibc-specific. The NeXT system has similar routines:"
2802 #: build/C/man3/setaliasent.3:104
2804 msgid "#include E<lt>aliasdb.hE<gt>\n"
2808 #: build/C/man3/setaliasent.3:109
2811 "void alias_setent(void);\n"
2812 "void alias_endent(void);\n"
2813 "alias_ent *alias_getent(void);\n"
2814 "alias_ent *alias_getbyname(char *name);\n"
2818 #: build/C/man3/setaliasent.3:115
2820 "The following example compiles with I<gcc example.c -o example>. It will "
2821 "dump all names in the alias database."
2825 #: build/C/man3/setaliasent.3:121
2828 "#include E<lt>aliases.hE<gt>\n"
2829 "#include E<lt>stdio.hE<gt>\n"
2830 "#include E<lt>stdlib.hE<gt>\n"
2831 "#include E<lt>errno.hE<gt>\n"
2835 #: build/C/man3/setaliasent.3:140
2841 " struct aliasent *al;\n"
2844 " al = getaliasent();\n"
2845 " if (al == NULL)\n"
2847 " printf(\"Name: %s\\en\", al-E<gt>alias_name);\n"
2850 " perror(\"reading alias\");\n"
2851 " exit(EXIT_FAILURE);\n"
2854 " exit(EXIT_SUCCESS);\n"
2859 #. /etc/sendmail/aliases
2861 #. newaliases, postalias
2863 #: build/C/man3/setaliasent.3:150
2864 msgid "B<getgrent>(3), B<getpwent>(3), B<getspent>(3), B<aliases>(5)"