OSDN Git Service

e8f69dc15c70e366ad980070b128e376e4b6368c
[linuxjm/LDP_man-pages.git] / po4a / pwdgrp / po / pwdgrp.pot
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.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-04-25 05:36+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"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/fgetgrent.3:28
21 #, no-wrap
22 msgid "FGETGRENT"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/fgetgrent.3:28 build/C/man3/fgetpwent.3:31
27 #, no-wrap
28 msgid "2008-07-10"
29 msgstr ""
30
31 #. type: TH
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
33 #, no-wrap
34 msgid "GNU"
35 msgstr ""
36
37 #. type: TH
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
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
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
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man3/fgetgrent.3:31
51 msgid "fgetgrent - get group file entry"
52 msgstr ""
53
54 #. type: SH
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
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man3/fgetgrent.3:36
62 #, no-wrap
63 msgid ""
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"
67 msgstr ""
68
69 #. type: Plain text
70 #: build/C/man3/fgetgrent.3:38
71 #, no-wrap
72 msgid "B<struct group *fgetgrent(FILE *>I<stream>B<);>\n"
73 msgstr ""
74
75 #. type: Plain text
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)):"
78 msgstr ""
79
80 #. type: Plain text
81 #: build/C/man3/fgetgrent.3:47
82 msgid "B<fgetgrent>(): _SVID_SOURCE"
83 msgstr ""
84
85 #. type: SH
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
87 #, no-wrap
88 msgid "DESCRIPTION"
89 msgstr ""
90
91 #. type: Plain text
92 #: build/C/man3/fgetgrent.3:61
93 msgid ""
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))."
99 msgstr ""
100
101 #. type: Plain text
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:"
104 msgstr ""
105
106 #. type: Plain text
107 #: build/C/man3/fgetgrent.3:72
108 #, no-wrap
109 msgid ""
110 "struct group {\n"
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"
115 "};\n"
116 msgstr ""
117
118 #. type: SH
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
120 #, no-wrap
121 msgid "RETURN VALUE"
122 msgstr ""
123
124 #. type: Plain text
125 #: build/C/man3/fgetgrent.3:81
126 msgid ""
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."
129 msgstr ""
130
131 #. type: SH
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
133 #, no-wrap
134 msgid "ERRORS"
135 msgstr ""
136
137 #. type: TP
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
139 #, no-wrap
140 msgid "B<ENOMEM>"
141 msgstr ""
142
143 #.  not in POSIX
144 #.  to allocate the group structure, or to allocate buffers
145 #. type: Plain text
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."
148 msgstr ""
149
150 #. type: SH
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
152 #, no-wrap
153 msgid "CONFORMING TO"
154 msgstr ""
155
156 #. type: Plain text
157 #: build/C/man3/fgetgrent.3:89 build/C/man3/fgetpwent.3:98 build/C/man3/putpwent.3:79
158 msgid "SVr4."
159 msgstr ""
160
161 #. type: SH
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
163 #, no-wrap
164 msgid "SEE ALSO"
165 msgstr ""
166
167 #. type: Plain text
168 #: build/C/man3/fgetgrent.3:98
169 msgid ""
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)"
172 msgstr ""
173
174 #. type: TH
175 #: build/C/man3/fgetpwent.3:31
176 #, no-wrap
177 msgid "FGETPWENT"
178 msgstr ""
179
180 #. type: Plain text
181 #: build/C/man3/fgetpwent.3:34
182 msgid "fgetpwent - get password file entry"
183 msgstr ""
184
185 #. type: Plain text
186 #: build/C/man3/fgetpwent.3:39 build/C/man3/putpwent.3:36
187 #, no-wrap
188 msgid ""
189 "B<#include E<lt>stdio.hE<gt>>\n"
190 "B<#include E<lt>sys/types.hE<gt>>\n"
191 "B<#include E<lt>pwd.hE<gt>>\n"
192 msgstr ""
193
194 #. type: Plain text
195 #: build/C/man3/fgetpwent.3:41
196 #, no-wrap
197 msgid "B<struct passwd *fgetpwent(FILE *>I<stream>B<);>\n"
198 msgstr ""
199
200 #. type: Plain text
201 #: build/C/man3/fgetpwent.3:50
202 msgid "B<fgetpwent>(): _SVID_SOURCE"
203 msgstr ""
204
205 #. type: Plain text
206 #: build/C/man3/fgetpwent.3:63
207 msgid ""
208 "The B<fgetpwent>()  function returns a pointer to a structure containing the "
209 "broken out fields of a line in the file I<stream>.  The first time it is "
210 "called it returns the first entry; thereafter, it returns successive "
211 "entries.  The file referred to by I<stream> must have the same format as "
212 "I</etc/passwd> (see B<passwd>(5))."
213 msgstr ""
214
215 #. type: Plain text
216 #: 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
217 msgid "The I<passwd> structure is defined in I<E<lt>pwd.hE<gt>> as follows:"
218 msgstr ""
219
220 #. type: Plain text
221 #: build/C/man3/fgetpwent.3:77
222 #, no-wrap
223 msgid ""
224 "struct passwd {\n"
225 "    char   *pw_name;       /* username */\n"
226 "    char   *pw_passwd;     /* user password */\n"
227 "    uid_t   pw_uid;        /* user ID */\n"
228 "    gid_t   pw_gid;        /* group ID */\n"
229 "    char   *pw_gecos;      /* real name */\n"
230 "    char   *pw_dir;        /* home directory */\n"
231 "    char   *pw_shell;      /* shell program */\n"
232 "};\n"
233 msgstr ""
234
235 #. type: Plain text
236 #: build/C/man3/fgetpwent.3:86
237 msgid ""
238 "The B<fgetpwent>()  function returns a pointer to a I<passwd> structure, or "
239 "NULL if there are no more entries or an error occurs."
240 msgstr ""
241
242 #.  not in POSIX
243 #.  This structure is static, allocated 0 or 1 times. No memory leak. (libc45)
244 #. type: Plain text
245 #: build/C/man3/fgetpwent.3:92 build/C/man3/getpw.3:90 build/C/man3/getpwent.3:145 build/C/man3/getpwnam.3:202
246 msgid "Insufficient memory to allocate I<passwd> structure."
247 msgstr ""
248
249 #. type: SH
250 #: 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
251 #, no-wrap
252 msgid "FILES"
253 msgstr ""
254
255 #. type: Plain text
256 #: 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
257 #, no-wrap
258 msgid "I</etc/passwd>"
259 msgstr ""
260
261 #. type: Plain text
262 #: build/C/man3/fgetpwent.3:96 build/C/man3/getpw.3:94
263 msgid "password database file"
264 msgstr ""
265
266 #. type: Plain text
267 #: build/C/man3/fgetpwent.3:108
268 msgid ""
269 "B<endpwent>(3), B<fgetpwent_r>(3), B<fopen>(3), B<getpw>(3), B<getpwent>(3), "
270 "B<getpwnam>(3), B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
271 msgstr ""
272
273 #. type: TH
274 #: build/C/man5/ftpusers.5:17
275 #, no-wrap
276 msgid "FTPUSERS"
277 msgstr ""
278
279 #. type: TH
280 #: build/C/man5/ftpusers.5:17
281 #, no-wrap
282 msgid "2000-08-27"
283 msgstr ""
284
285 #. type: TH
286 #: build/C/man5/ftpusers.5:17 build/C/man5/group.5:25 build/C/man5/passwd.5:29
287 #, no-wrap
288 msgid "Linux"
289 msgstr ""
290
291 #. type: Plain text
292 #: build/C/man5/ftpusers.5:20
293 msgid "ftpusers - list of users that may not log in via the FTP daemon"
294 msgstr ""
295
296 #. type: Plain text
297 #: build/C/man5/ftpusers.5:39
298 msgid ""
299 "The text file B<ftpusers> contains a list of users that may not log in using "
300 "the File Transfer Protocol (FTP) server daemon.  This file is used not "
301 "merely for system administration purposes but for improving security within "
302 "a TCP/IP networked environment.  It will typically contain a list of the "
303 "users that either have no business using ftp or have too many privileges to "
304 "be allowed to log in through the FTP server daemon.  Such users usually "
305 "include root, daemon, bin, uucp, and news.  If your FTP server daemon "
306 "doesn't use B<ftpusers> then it is suggested that you read its documentation "
307 "to find out how to block access for certain users.  Washington University "
308 "FTP server Daemon (wuftpd) and Professional FTP Daemon (proftpd) are known "
309 "to make use of B<ftpusers>."
310 msgstr ""
311
312 #. type: SS
313 #: build/C/man5/ftpusers.5:39
314 #, no-wrap
315 msgid "Format"
316 msgstr ""
317
318 #. type: Plain text
319 #: build/C/man5/ftpusers.5:45
320 msgid ""
321 "The format of B<ftpusers> is very simple.  There is one account name (or "
322 "username) per line.  Lines starting with a # are ignored."
323 msgstr ""
324
325 #. type: Plain text
326 #: build/C/man5/ftpusers.5:47
327 msgid "I</etc/ftpusers>"
328 msgstr ""
329
330 #. type: Plain text
331 #: build/C/man5/ftpusers.5:50
332 msgid "B<passwd>(5), B<proftpd>(8), B<wuftpd>(8)"
333 msgstr ""
334
335 #. type: TH
336 #: build/C/man3/getgrent.3:28
337 #, no-wrap
338 msgid "GETGRENT"
339 msgstr ""
340
341 #. type: TH
342 #: 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
343 #, no-wrap
344 msgid "2010-10-21"
345 msgstr ""
346
347 #. type: Plain text
348 #: build/C/man3/getgrent.3:31
349 msgid "getgrent, setgrent, endgrent - get group file entry"
350 msgstr ""
351
352 #. type: Plain text
353 #: build/C/man3/getgrent.3:35 build/C/man3/getgrnam.3:38 build/C/man3/initgroups.3:37
354 #, no-wrap
355 msgid ""
356 "B<#include E<lt>sys/types.hE<gt>>\n"
357 "B<#include E<lt>grp.hE<gt>>\n"
358 msgstr ""
359
360 #. type: Plain text
361 #: build/C/man3/getgrent.3:37
362 #, no-wrap
363 msgid "B<struct group *getgrent(void);>\n"
364 msgstr ""
365
366 #. type: Plain text
367 #: build/C/man3/getgrent.3:39
368 #, no-wrap
369 msgid "B<void setgrent(void);>\n"
370 msgstr ""
371
372 #. type: Plain text
373 #: build/C/man3/getgrent.3:41
374 #, no-wrap
375 msgid "B<void endgrent(void);>\n"
376 msgstr ""
377
378 #. type: Plain text
379 #: build/C/man3/getgrent.3:51
380 msgid "B<setgrent>():"
381 msgstr ""
382
383 #. type: Plain text
384 #: build/C/man3/getgrent.3:54
385 msgid ""
386 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
387 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED ||"
388 msgstr ""
389
390 #. type: Plain text
391 #: build/C/man3/getgrent.3:56
392 msgid "/* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
393 msgstr ""
394
395 #. type: Plain text
396 #: build/C/man3/getgrent.3:60
397 msgid "B<getgrent>(), B<endgrent>():"
398 msgstr ""
399
400 #. type: Plain text
401 #: build/C/man3/getgrent.3:63
402 msgid ""
403 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
404 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
405 msgstr ""
406
407 #. type: Plain text
408 #: build/C/man3/getgrent.3:78
409 msgid ""
410 "The B<getgrent>()  function returns a pointer to a structure containing the "
411 "broken-out fields of a record in the group database (e.g., the local group "
412 "file I</etc/group>, NIS, and LDAP).  The first time B<getgrent>()  is "
413 "called, it returns the first entry; thereafter, it returns successive "
414 "entries."
415 msgstr ""
416
417 #. type: Plain text
418 #: build/C/man3/getgrent.3:83
419 msgid ""
420 "The B<setgrent>()  function rewinds to the beginning of the group database, "
421 "to allow repeated scans."
422 msgstr ""
423
424 #. type: Plain text
425 #: build/C/man3/getgrent.3:88
426 msgid ""
427 "The B<endgrent>()  function is used to close the group database after all "
428 "processing has been performed."
429 msgstr ""
430
431 #. type: Plain text
432 #: build/C/man3/getgrent.3:99 build/C/man3/getgrnam.3:93
433 #, no-wrap
434 msgid ""
435 "struct group {\n"
436 "    char   *gr_name;       /* group name */\n"
437 "    char   *gr_passwd;     /* group password */\n"
438 "    gid_t   gr_gid;        /* group ID */\n"
439 "    char  **gr_mem;        /* group members */\n"
440 "};\n"
441 msgstr ""
442
443 #. type: Plain text
444 #: build/C/man3/getgrent.3:104 build/C/man3/getgrent_r.3:81 build/C/man3/getgrnam.3:98
445 msgid "For more information about the fields of this structure, see B<group>(5)."
446 msgstr ""
447
448 #. type: Plain text
449 #: build/C/man3/getgrent.3:111
450 msgid ""
451 "The B<getgrent>()  function returns a pointer to a I<group> structure, or "
452 "NULL if there are no more entries or an error occurs."
453 msgstr ""
454
455 #. type: Plain text
456 #: build/C/man3/getgrent.3:118
457 msgid ""
458 "Upon error, I<errno> may be set.  If one wants to check I<errno> after the "
459 "call, it should be set to zero before the call."
460 msgstr ""
461
462 #. type: Plain text
463 #: build/C/man3/getgrent.3:127
464 msgid ""
465 "The return value may point to a static area, and may be overwritten by "
466 "subsequent calls to B<getgrent>(), B<getgrgid>(3), or B<getgrnam>(3).  (Do "
467 "not pass the returned pointer to B<free>(3).)"
468 msgstr ""
469
470 #. type: TP
471 #: build/C/man3/getgrent.3:128 build/C/man3/getgrnam.3:174 build/C/man3/getpwent.3:124 build/C/man3/getpwnam.3:181
472 #, no-wrap
473 msgid "B<EINTR>"
474 msgstr ""
475
476 #. type: Plain text
477 #: build/C/man3/getgrent.3:131 build/C/man3/getgrnam.3:177 build/C/man3/getpwent.3:127 build/C/man3/getpwnam.3:184
478 msgid "A signal was caught."
479 msgstr ""
480
481 #. type: TP
482 #: build/C/man3/getgrent.3:131 build/C/man3/getgrnam.3:177 build/C/man3/getpwent.3:127 build/C/man3/getpwnam.3:184
483 #, no-wrap
484 msgid "B<EIO>"
485 msgstr ""
486
487 #. type: Plain text
488 #: build/C/man3/getgrent.3:134 build/C/man3/getgrnam.3:180 build/C/man3/getpwent.3:130 build/C/man3/getpwnam.3:187
489 msgid "I/O error."
490 msgstr ""
491
492 #. type: TP
493 #: build/C/man3/getgrent.3:134 build/C/man3/getgrnam.3:180 build/C/man3/getpwent.3:130 build/C/man3/getpwnam.3:187
494 #, no-wrap
495 msgid "B<EMFILE>"
496 msgstr ""
497
498 #. type: Plain text
499 #: build/C/man3/getgrent.3:137
500 msgid "The calling process already has too many open files."
501 msgstr ""
502
503 #. type: TP
504 #: build/C/man3/getgrent.3:137 build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:135 build/C/man3/getpwnam.3:192
505 #, no-wrap
506 msgid "B<ENFILE>"
507 msgstr ""
508
509 #. type: Plain text
510 #: build/C/man3/getgrent.3:140
511 msgid "Too many open files in the system."
512 msgstr ""
513
514 #. type: TP
515 #: 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
516 #, no-wrap
517 msgid "B<ERANGE>"
518 msgstr ""
519
520 #. type: Plain text
521 #: build/C/man3/getgrent.3:149 build/C/man3/getgrnam.3:198 build/C/man3/getpwent.3:148 build/C/man3/getpwnam.3:205
522 msgid "Insufficient buffer space supplied."
523 msgstr ""
524
525 #. type: TP
526 #: build/C/man3/getgrent.3:150 build/C/man3/getgrnam.3:199
527 #, no-wrap
528 msgid "I</etc/group>"
529 msgstr ""
530
531 #. type: Plain text
532 #: build/C/man3/getgrent.3:153 build/C/man3/getgrnam.3:202
533 msgid "local group database file"
534 msgstr ""
535
536 #. type: Plain text
537 #: build/C/man3/getgrent.3:155 build/C/man3/getgrnam.3:204
538 msgid "SVr4, 4.3BSD, POSIX.1-2001."
539 msgstr ""
540
541 #. type: Plain text
542 #: build/C/man3/getgrent.3:162
543 msgid ""
544 "B<fgetgrent>(3), B<getgrent_r>(3), B<getgrgid>(3), B<getgrnam>(3), "
545 "B<getgrouplist>(3), B<putgrent>(3), B<group>(5)"
546 msgstr ""
547
548 #. type: TH
549 #: build/C/man3/getgrent_r.3:23
550 #, no-wrap
551 msgid "GETGRENT_R"
552 msgstr ""
553
554 #. type: Plain text
555 #: build/C/man3/getgrent_r.3:26
556 msgid "getgrent_r, fgetgrent_r - get group file entry reentrantly"
557 msgstr ""
558
559 #. type: Plain text
560 #: build/C/man3/getgrent_r.3:29
561 #, no-wrap
562 msgid "B<#include E<lt>grp.hE<gt>>\n"
563 msgstr ""
564
565 #. type: Plain text
566 #: build/C/man3/getgrent_r.3:31
567 #, no-wrap
568 msgid "B<int getgrent_r(struct group *>I<gbuf>B<, char *>I<buf>B<,>\n"
569 msgstr ""
570
571 #. type: Plain text
572 #: build/C/man3/getgrent_r.3:33
573 #, no-wrap
574 msgid "B<               size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
575 msgstr ""
576
577 #. type: Plain text
578 #: build/C/man3/getgrent_r.3:35
579 #, no-wrap
580 msgid ""
581 "B<int fgetgrent_r(FILE *>I<fp>B<, struct group *>I<gbuf>B<, char "
582 "*>I<buf>B<,>\n"
583 msgstr ""
584
585 #. type: Plain text
586 #: build/C/man3/getgrent_r.3:37
587 #, no-wrap
588 msgid "B<                size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
589 msgstr ""
590
591 #.  FIXME . The FTM requirements seem inconsistent here.  File a glibc bug?
592 #. type: Plain text
593 #: build/C/man3/getgrent_r.3:47
594 msgid "B<getgrent_r>(): _GNU_SOURCE"
595 msgstr ""
596
597 #. type: Plain text
598 #: build/C/man3/getgrent_r.3:50
599 msgid "B<fgetgrent_r>(): _SVID_SOURCE"
600 msgstr ""
601
602 #. type: Plain text
603 #: build/C/man3/getgrent_r.3:63
604 msgid ""
605 "The functions B<getgrent_r>()  and B<fgetgrent_r>()  are the reentrant "
606 "versions of B<getgrent>(3)  and B<fgetgrent>(3).  The former reads the next "
607 "group entry from the stream initialized by B<setgrent>(3).  The latter reads "
608 "the next group entry from the stream I<fp>."
609 msgstr ""
610
611 #. type: Plain text
612 #: build/C/man3/getgrent_r.3:76
613 #, no-wrap
614 msgid ""
615 "struct group {\n"
616 "    char    *gr_name;     /* group name */\n"
617 "    char    *gr_passwd;   /* group password */\n"
618 "    gid_t    gr_gid;      /* group ID */\n"
619 "    char   **gr_mem;      /* group members */\n"
620 "};\n"
621 msgstr ""
622
623 #. type: Plain text
624 #: build/C/man3/getgrent_r.3:100
625 msgid ""
626 "The nonreentrant functions return a pointer to static storage, where this "
627 "static storage contains further pointers to group name, password and "
628 "members.  The reentrant functions described here return all of that in "
629 "caller-provided buffers.  First of all there is the buffer I<gbuf> that can "
630 "hold a I<struct group>.  And next the buffer I<buf> of size I<buflen> that "
631 "can hold additional strings.  The result of these functions, the I<struct "
632 "group> read from the stream, is stored in the provided buffer I<*gbuf>, and "
633 "a pointer to this I<struct group> is returned in I<*gbufp>."
634 msgstr ""
635
636 #. type: Plain text
637 #: build/C/man3/getgrent_r.3:107
638 msgid ""
639 "On success, these functions return 0 and I<*gbufp> is a pointer to the "
640 "I<struct group>.  On error, these functions return an error value and "
641 "I<*gbufp> is NULL."
642 msgstr ""
643
644 #. type: TP
645 #: build/C/man3/getgrent_r.3:108 build/C/man3/getpw.3:81 build/C/man3/getpwent_r.3:110
646 #, no-wrap
647 msgid "B<ENOENT>"
648 msgstr ""
649
650 #. type: Plain text
651 #: build/C/man3/getgrent_r.3:111 build/C/man3/getpwent_r.3:113
652 msgid "No more entries."
653 msgstr ""
654
655 #. type: Plain text
656 #: build/C/man3/getgrent_r.3:115 build/C/man3/getpwent_r.3:117
657 msgid "Insufficient buffer space supplied.  Try again with larger buffer."
658 msgstr ""
659
660 #. type: Plain text
661 #: build/C/man3/getgrent_r.3:120 build/C/man3/getpwent_r.3:122
662 msgid ""
663 "These functions are GNU extensions, done in a style resembling the POSIX "
664 "version of functions like B<getpwnam_r>(3).  Other systems use prototype"
665 msgstr ""
666
667 #. type: Plain text
668 #: build/C/man3/getgrent_r.3:125
669 #, no-wrap
670 msgid ""
671 "struct group *getgrent_r(struct group *grp, char *buf,\n"
672 "                         int buflen);\n"
673 msgstr ""
674
675 #. type: Plain text
676 #: build/C/man3/getgrent_r.3:129 build/C/man3/getpwent_r.3:131
677 msgid "or, better,"
678 msgstr ""
679
680 #. type: Plain text
681 #: build/C/man3/getgrent_r.3:134
682 #, no-wrap
683 msgid ""
684 "int getgrent_r(struct group *grp, char *buf, int buflen,\n"
685 "               FILE **gr_fp);\n"
686 msgstr ""
687
688 #. type: SH
689 #: 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
690 #, no-wrap
691 msgid "NOTES"
692 msgstr ""
693
694 #. type: Plain text
695 #: build/C/man3/getgrent_r.3:141
696 msgid ""
697 "The function B<getgrent_r>()  is not really reentrant since it shares the "
698 "reading position in the stream with all other threads."
699 msgstr ""
700
701 #. type: SH
702 #: 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
703 #, no-wrap
704 msgid "EXAMPLE"
705 msgstr ""
706
707 #. type: Plain text
708 #: build/C/man3/getgrent_r.3:148
709 #, no-wrap
710 msgid ""
711 "#define _GNU_SOURCE\n"
712 "#include E<lt>grp.hE<gt>\n"
713 "#include E<lt>stdio.hE<gt>\n"
714 "#include E<lt>stdlib.hE<gt>\n"
715 "#define BUFLEN 4096\n"
716 msgstr ""
717
718 #. type: Plain text
719 #: build/C/man3/getgrent_r.3:155
720 #, no-wrap
721 msgid ""
722 "int\n"
723 "main(void)\n"
724 "{\n"
725 "    struct group grp, *grpp;\n"
726 "    char buf[BUFLEN];\n"
727 "    int i;\n"
728 msgstr ""
729
730 #. type: Plain text
731 #: build/C/man3/getgrent_r.3:172
732 #, no-wrap
733 msgid ""
734 "    setgrent();\n"
735 "    while (1) {\n"
736 "        i = getgrent_r(&grp, buf, BUFLEN, &grpp);\n"
737 "        if (i)\n"
738 "            break;\n"
739 "        printf(\"%s (%d):\", grpp-E<gt>gr_name, grpp-E<gt>gr_gid);\n"
740 "        for (i = 0; ; i++) {\n"
741 "            if (grpp-E<gt>gr_mem[i] == NULL)\n"
742 "                break;\n"
743 "            printf(\" %s\", grpp-E<gt>gr_mem[i]);\n"
744 "        }\n"
745 "        printf(\"\\en\");\n"
746 "    }\n"
747 "    endgrent();\n"
748 "    exit(EXIT_SUCCESS);\n"
749 "}\n"
750 msgstr ""
751
752 #. type: Plain text
753 #: build/C/man3/getgrent_r.3:188
754 msgid ""
755 "B<fgetgrent>(3), B<getgrent>(3), B<getgrgid>(3), B<getgrnam>(3), "
756 "B<putgrent>(3), B<group>(5)"
757 msgstr ""
758
759 #. type: TH
760 #: build/C/man3/getgrnam.3:31
761 #, no-wrap
762 msgid "GETGRNAM"
763 msgstr ""
764
765 #. type: Plain text
766 #: build/C/man3/getgrnam.3:34
767 msgid "getgrnam, getgrnam_r, getgrgid, getgrgid_r - get group file entry"
768 msgstr ""
769
770 #. type: Plain text
771 #: build/C/man3/getgrnam.3:40
772 #, no-wrap
773 msgid "B<struct group *getgrnam(const char *>I<name>B<);>\n"
774 msgstr ""
775
776 #. type: Plain text
777 #: build/C/man3/getgrnam.3:42
778 #, no-wrap
779 msgid "B<struct group *getgrgid(gid_t >I<gid>B<);>\n"
780 msgstr ""
781
782 #. type: Plain text
783 #: build/C/man3/getgrnam.3:44
784 #, no-wrap
785 msgid "B<int getgrnam_r(const char *>I<name>B<, struct group *>I<grp>B<,>\n"
786 msgstr ""
787
788 #. type: Plain text
789 #: build/C/man3/getgrnam.3:46 build/C/man3/getgrnam.3:50
790 #, no-wrap
791 msgid ""
792 "B<          char *>I<buf>B<, size_t >I<buflen>B<, struct group "
793 "**>I<result>B<);>\n"
794 msgstr ""
795
796 #. type: Plain text
797 #: build/C/man3/getgrnam.3:48
798 #, no-wrap
799 msgid "B<int getgrgid_r(gid_t >I<gid>B<, struct group *>I<grp>B<,>\n"
800 msgstr ""
801
802 #. type: Plain text
803 #: build/C/man3/getgrnam.3:60
804 msgid "B<getgrnam_r>(), B<getgrgid_r>():"
805 msgstr ""
806
807 #. type: Plain text
808 #: build/C/man3/getgrnam.3:63 build/C/man3/getpwnam.3:67
809 msgid ""
810 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
811 "|| _POSIX_SOURCE"
812 msgstr ""
813
814 #. type: Plain text
815 #: build/C/man3/getgrnam.3:75
816 msgid ""
817 "The B<getgrnam>()  function returns a pointer to a structure containing the "
818 "broken-out fields of the record in the group database (e.g., the local group "
819 "file I</etc/group>, NIS, and LDAP)  that matches the group name I<name>."
820 msgstr ""
821
822 #. type: Plain text
823 #: build/C/man3/getgrnam.3:82
824 msgid ""
825 "The B<getgrgid>()  function returns a pointer to a structure containing the "
826 "broken-out fields of the record in the group database that matches the group "
827 "ID I<gid>."
828 msgstr ""
829
830 #. type: Plain text
831 #: build/C/man3/getgrnam.3:121
832 msgid ""
833 "The B<getgrnam_r>()  and B<getgrgid_r>()  functions obtain the same "
834 "information as B<getgrnam>()  and B<getgrgid>(), but store the retrieved "
835 "I<group> structure in the space pointed to by I<grp>.  The string fields "
836 "pointed to by the members of the I<group> structure are stored in the buffer "
837 "I<buf> of size I<buflen>.  A pointer to the result (in case of success) or "
838 "NULL (in case no entry was found or an error occurred) is stored in "
839 "I<*result>."
840 msgstr ""
841
842 #. type: Plain text
843 #: build/C/man3/getgrnam.3:128
844 msgid ""
845 "The maximum needed size for I<buf> can be found using B<sysconf>(3)  with "
846 "the argument B<_SC_GETGR_R_SIZE_MAX>."
847 msgstr ""
848
849 #. type: Plain text
850 #: build/C/man3/getgrnam.3:143
851 msgid ""
852 "The B<getgrnam>()  and B<getgrgid>()  functions return a pointer to a "
853 "I<group> structure, or NULL if the matching entry is not found or an error "
854 "occurs.  If an error occurs, I<errno> is set appropriately.  If one wants to "
855 "check I<errno> after the call, it should be set to zero before the call."
856 msgstr ""
857
858 #. type: Plain text
859 #: build/C/man3/getgrnam.3:152
860 msgid ""
861 "The return value may point to a static area, and may be overwritten by "
862 "subsequent calls to B<getgrent>(3), B<getgrgid>(), or B<getgrnam>().  (Do "
863 "not pass the returned pointer to B<free>(3).)"
864 msgstr ""
865
866 #. type: Plain text
867 #: build/C/man3/getgrnam.3:166
868 msgid ""
869 "On success, B<getgrnam_r>()  and B<getgrgid_r>()  return zero, and set "
870 "I<*result> to I<grp>.  If no matching group record was found, these "
871 "functions return 0 and store NULL in I<*result>.  In case of error, an error "
872 "number is returned, and NULL is stored in I<*result>."
873 msgstr ""
874
875 #. type: TP
876 #: build/C/man3/getgrnam.3:167 build/C/man3/getpwnam.3:174
877 #, no-wrap
878 msgid "B<0> or B<ENOENT> or B<ESRCH> or B<EBADF> or B<EPERM> or ... "
879 msgstr ""
880
881 #. type: Plain text
882 #: build/C/man3/getgrnam.3:174
883 msgid "The given I<name> or I<gid> was not found."
884 msgstr ""
885
886 #. type: Plain text
887 #: build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:135 build/C/man3/getpwnam.3:192
888 msgid ""
889 "The maximum number (B<OPEN_MAX>)  of files was open already in the calling "
890 "process."
891 msgstr ""
892
893 #. type: Plain text
894 #: build/C/man3/getgrnam.3:188 build/C/man3/getpwent.3:138 build/C/man3/getpwnam.3:195
895 msgid "The maximum number of files was open already in the system."
896 msgstr ""
897
898 #.  more precisely:
899 #.  AIX 5.1 - gives ESRCH
900 #.  OSF1 4.0g - gives EWOULDBLOCK
901 #.  libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
902 #.  glibc since version 2.7 - give 0
903 #.  FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
904 #.  SunOS 5.8 - gives EBADF
905 #.  Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
906 #. type: Plain text
907 #: build/C/man3/getgrnam.3:225
908 msgid ""
909 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001.  It "
910 "does not call \"not found\" an error, hence does not specify what value "
911 "I<errno> might have in this situation.  But that makes it impossible to "
912 "recognize errors.  One might argue that according to POSIX I<errno> should "
913 "be left unchanged if an entry is not found.  Experiments on various "
914 "UNIX-like systems shows that lots of different values occur in this "
915 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
916 msgstr ""
917
918 #. type: Plain text
919 #: build/C/man3/getgrnam.3:231
920 msgid ""
921 "B<endgrent>(3), B<fgetgrent>(3), B<getgrent>(3), B<getpwnam>(3), "
922 "B<setgrent>(3), B<group>(5)"
923 msgstr ""
924
925 #. type: TH
926 #: build/C/man3/getgrouplist.3:27
927 #, no-wrap
928 msgid "GETGROUPLIST"
929 msgstr ""
930
931 #. type: TH
932 #: build/C/man3/getgrouplist.3:27
933 #, no-wrap
934 msgid "2008-07-03"
935 msgstr ""
936
937 #. type: Plain text
938 #: build/C/man3/getgrouplist.3:30
939 msgid "getgrouplist - get list of groups to which a user belongs"
940 msgstr ""
941
942 #. type: Plain text
943 #: build/C/man3/getgrouplist.3:32 build/C/man3/putgrent.3:11
944 msgid "B<#include E<lt>grp.hE<gt>>"
945 msgstr ""
946
947 #. type: Plain text
948 #: build/C/man3/getgrouplist.3:34
949 msgid "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>"
950 msgstr ""
951
952 #. type: Plain text
953 #: build/C/man3/getgrouplist.3:36
954 msgid "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>"
955 msgstr ""
956
957 #. type: Plain text
958 #: build/C/man3/getgrouplist.3:44
959 msgid "B<getgrouplist>(): _BSD_SOURCE"
960 msgstr ""
961
962 #. type: Plain text
963 #: build/C/man3/getgrouplist.3:56
964 msgid ""
965 "The B<getgrouplist>()  function scans the group database (see B<group>(5))  "
966 "to obtain the list of groups that I<user> belongs to.  Up to I<*ngroups> of "
967 "these groups are returned in the array I<groups>."
968 msgstr ""
969
970 #. type: Plain text
971 #: build/C/man3/getgrouplist.3:66
972 msgid ""
973 "If it was not among the groups defined for I<user> in the group database, "
974 "then I<group> is included in the list of groups returned by "
975 "B<getgrouplist>(); typically this argument is specified as the group ID from "
976 "the password record for I<user>."
977 msgstr ""
978
979 #. type: Plain text
980 #: build/C/man3/getgrouplist.3:76
981 msgid ""
982 "The I<ngroups> argument is a value-result argument: on return it always "
983 "contains the number of groups found for I<user>, including I<group>; this "
984 "value may be greater than the number of groups stored in I<groups>."
985 msgstr ""
986
987 #. type: Plain text
988 #: build/C/man3/getgrouplist.3:84
989 msgid ""
990 "If the number of groups of which I<user> is a member is less than or equal "
991 "to I<*ngroups>, then the value I<*ngroups> is returned."
992 msgstr ""
993
994 #. type: Plain text
995 #: build/C/man3/getgrouplist.3:94
996 msgid ""
997 "If the user is a member of more than I<*ngroups> groups, then "
998 "B<getgrouplist>()  returns -1.  In this case the value returned in "
999 "I<*ngroups> can be used to resize the buffer passed to a further call "
1000 "B<getgrouplist>()."
1001 msgstr ""
1002
1003 #. type: SH
1004 #: build/C/man3/getgrouplist.3:94
1005 #, no-wrap
1006 msgid "VERSIONS"
1007 msgstr ""
1008
1009 #. type: Plain text
1010 #: build/C/man3/getgrouplist.3:96
1011 msgid "This function is present since glibc 2.2.4."
1012 msgstr ""
1013
1014 #. type: Plain text
1015 #: build/C/man3/getgrouplist.3:98
1016 msgid "This function is nonstandard; it appears on most BSDs."
1017 msgstr ""
1018
1019 #. type: SH
1020 #: build/C/man3/getgrouplist.3:98 build/C/man3/getpw.3:96 build/C/man5/group.5:54
1021 #, no-wrap
1022 msgid "BUGS"
1023 msgstr ""
1024
1025 #. type: Plain text
1026 #: build/C/man3/getgrouplist.3:107
1027 msgid ""
1028 "In glibc versions before 2.3.3, the implementation of this function contains "
1029 "a buffer-overrun bug: it returns the complete list of groups for I<user> in "
1030 "the array I<groups>, even when the number of groups exceeds I<*ngroups>."
1031 msgstr ""
1032
1033 #. type: Plain text
1034 #: build/C/man3/getgrouplist.3:116
1035 msgid ""
1036 "The program below displays the group list for the user named in its first "
1037 "command-line argument.  The second command-line argument specifies the "
1038 "I<ngroups> value to be supplied to B<getgrouplist>().  The following shell "
1039 "session shows examples of the use of this program:"
1040 msgstr ""
1041
1042 #. type: Plain text
1043 #: build/C/man3/getgrouplist.3:126
1044 #, no-wrap
1045 msgid ""
1046 "$B< ./a.out cecilia 0>\n"
1047 "getgrouplist() returned -1; ngroups = 3\n"
1048 "$B< ./a.out cecilia 3>\n"
1049 "ngroups = 3\n"
1050 "16 (dialout)\n"
1051 "33 (video)\n"
1052 "100 (users)\n"
1053 msgstr ""
1054
1055 #. type: SS
1056 #: build/C/man3/getgrouplist.3:128
1057 #, no-wrap
1058 msgid "Program source"
1059 msgstr ""
1060
1061 #. type: Plain text
1062 #: build/C/man3/getgrouplist.3:135
1063 #, no-wrap
1064 msgid ""
1065 "#include E<lt>stdio.hE<gt>\n"
1066 "#include E<lt>stdlib.hE<gt>\n"
1067 "#include E<lt>grp.hE<gt>\n"
1068 "#include E<lt>pwd.hE<gt>\n"
1069 msgstr ""
1070
1071 #. type: Plain text
1072 #: build/C/man3/getgrouplist.3:143
1073 #, no-wrap
1074 msgid ""
1075 "int\n"
1076 "main(int argc, char *argv[])\n"
1077 "{\n"
1078 "    int j, ngroups;\n"
1079 "    gid_t *groups;\n"
1080 "    struct passwd *pw;\n"
1081 "    struct group *gr;\n"
1082 msgstr ""
1083
1084 #. type: Plain text
1085 #: build/C/man3/getgrouplist.3:148
1086 #, no-wrap
1087 msgid ""
1088 "    if (argc != 3) {\n"
1089 "        fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", "
1090 "argv[0]);\n"
1091 "        exit(EXIT_FAILURE);\n"
1092 "    }\n"
1093 msgstr ""
1094
1095 #. type: Plain text
1096 #: build/C/man3/getgrouplist.3:150
1097 #, no-wrap
1098 msgid "    ngroups = atoi(argv[2]);\n"
1099 msgstr ""
1100
1101 #. type: Plain text
1102 #: build/C/man3/getgrouplist.3:156
1103 #, no-wrap
1104 msgid ""
1105 "    groups = malloc(ngroups * sizeof (gid_t));\n"
1106 "    if (groups == NULL) {\n"
1107 "        perror(\"malloc\");\n"
1108 "        exit(EXIT_FAILURE);\n"
1109 "    }\n"
1110 msgstr ""
1111
1112 #. type: Plain text
1113 #: build/C/man3/getgrouplist.3:158
1114 #, no-wrap
1115 msgid "    /* Fetch passwd structure (contains first group ID for user) */\n"
1116 msgstr ""
1117
1118 #. type: Plain text
1119 #: build/C/man3/getgrouplist.3:164
1120 #, no-wrap
1121 msgid ""
1122 "    pw = getpwnam(argv[1]);\n"
1123 "    if (pw == NULL) {\n"
1124 "        perror(\"getpwnam\");\n"
1125 "        exit(EXIT_SUCCESS);\n"
1126 "    }\n"
1127 msgstr ""
1128
1129 #. type: Plain text
1130 #: build/C/man3/getgrouplist.3:166
1131 #, no-wrap
1132 msgid "    /* Retrieve group list */\n"
1133 msgstr ""
1134
1135 #. type: Plain text
1136 #: build/C/man3/getgrouplist.3:172
1137 #, no-wrap
1138 msgid ""
1139 "    if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
1140 "        fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\en\",\n"
1141 "                ngroups);\n"
1142 "\texit(EXIT_FAILURE);\n"
1143 "    }\n"
1144 msgstr ""
1145
1146 #. type: Plain text
1147 #: build/C/man3/getgrouplist.3:174
1148 #, no-wrap
1149 msgid "    /* Display list of retrieved groups, along with group names */\n"
1150 msgstr ""
1151
1152 #. type: Plain text
1153 #: build/C/man3/getgrouplist.3:183
1154 #, no-wrap
1155 msgid ""
1156 "    fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
1157 "    for (j = 0; j E<lt> ngroups; j++) {\n"
1158 "        printf(\"%d\", groups[j]);\n"
1159 "        gr = getgrgid(groups[j]);\n"
1160 "        if (gr != NULL)\n"
1161 "            printf(\" (%s)\", gr-E<gt>gr_name);\n"
1162 "        printf(\"\\en\");\n"
1163 "    }\n"
1164 msgstr ""
1165
1166 #. type: Plain text
1167 #: build/C/man3/getgrouplist.3:186
1168 #, no-wrap
1169 msgid ""
1170 "    exit(EXIT_SUCCESS);\n"
1171 "}\n"
1172 msgstr ""
1173
1174 #. type: Plain text
1175 #: build/C/man3/getgrouplist.3:192
1176 msgid "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group>(5), B<passwd>(5)"
1177 msgstr ""
1178
1179 #. type: TH
1180 #: build/C/man3/getpw.3:30
1181 #, no-wrap
1182 msgid "GETPW"
1183 msgstr ""
1184
1185 #. type: Plain text
1186 #: build/C/man3/getpw.3:33
1187 msgid "getpw - Re-construct password line entry"
1188 msgstr ""
1189
1190 #. type: Plain text
1191 #: build/C/man3/getpw.3:38
1192 #, no-wrap
1193 msgid ""
1194 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1195 "B<#include E<lt>sys/types.hE<gt>>\n"
1196 "B<#include E<lt>pwd.hE<gt>>\n"
1197 msgstr ""
1198
1199 #. type: Plain text
1200 #: build/C/man3/getpw.3:40
1201 #, no-wrap
1202 msgid "B<int getpw(uid_t >I<uid>B<, char *>I<buf>B<);>\n"
1203 msgstr ""
1204
1205 #. type: Plain text
1206 #: build/C/man3/getpw.3:47
1207 msgid ""
1208 "The B<getpw>()  function reconstructs the password line entry for the given "
1209 "user ID I<uid> in the buffer I<buf>.  The returned buffer contains a line of "
1210 "format"
1211 msgstr ""
1212
1213 #. type: Plain text
1214 #: build/C/man3/getpw.3:50
1215 msgid "B<name:passwd:uid:gid:gecos:dir:shell>"
1216 msgstr ""
1217
1218 #. type: Plain text
1219 #: build/C/man3/getpw.3:65 build/C/man3/getpwent.3:96 build/C/man3/getpwnam.3:100
1220 #, no-wrap
1221 msgid ""
1222 "struct passwd {\n"
1223 "    char   *pw_name;       /* username */\n"
1224 "    char   *pw_passwd;     /* user password */\n"
1225 "    uid_t   pw_uid;        /* user ID */\n"
1226 "    gid_t   pw_gid;        /* group ID */\n"
1227 "    char   *pw_gecos;      /* user information */\n"
1228 "    char   *pw_dir;        /* home directory */\n"
1229 "    char   *pw_shell;      /* shell program */\n"
1230 "};\n"
1231 msgstr ""
1232
1233 #. type: Plain text
1234 #: build/C/man3/getpw.3:70 build/C/man3/getpwent.3:101 build/C/man3/getpwent_r.3:83
1235 msgid "For more information about the fields of this structure, see B<passwd>(5)."
1236 msgstr ""
1237
1238 #. type: Plain text
1239 #: build/C/man3/getpw.3:76
1240 msgid ""
1241 "The B<getpw>()  function returns 0 on success; on error, it returns -1, and "
1242 "I<errno> is set to indicate the error."
1243 msgstr ""
1244
1245 #. type: TP
1246 #: build/C/man3/getpw.3:77 build/C/man3/putpwent.3:74
1247 #, no-wrap
1248 msgid "B<EINVAL>"
1249 msgstr ""
1250
1251 #. type: Plain text
1252 #: build/C/man3/getpw.3:81
1253 msgid "I<buf> is NULL."
1254 msgstr ""
1255
1256 #. type: Plain text
1257 #: build/C/man3/getpw.3:85
1258 msgid "No user corresponding to I<uid>."
1259 msgstr ""
1260
1261 #. type: Plain text
1262 #: build/C/man3/getpw.3:96
1263 msgid "SVr2."
1264 msgstr ""
1265
1266 #. type: Plain text
1267 #: build/C/man3/getpw.3:103
1268 msgid ""
1269 "The B<getpw>()  function is dangerous as it may overflow the provided buffer "
1270 "I<buf>.  It is obsoleted by B<getpwuid>(3)."
1271 msgstr ""
1272
1273 #. type: Plain text
1274 #: build/C/man3/getpw.3:111
1275 msgid ""
1276 "B<endpwent>(3), B<fgetpwent>(3), B<getpwent>(3), B<getpwnam>(3), "
1277 "B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1278 msgstr ""
1279
1280 #. type: TH
1281 #: build/C/man3/getpwent.3:31
1282 #, no-wrap
1283 msgid "GETPWENT"
1284 msgstr ""
1285
1286 #. type: Plain text
1287 #: build/C/man3/getpwent.3:34
1288 msgid "getpwent, setpwent, endpwent - get password file entry"
1289 msgstr ""
1290
1291 #. type: Plain text
1292 #: build/C/man3/getpwent.3:38 build/C/man3/getpwnam.3:42
1293 #, no-wrap
1294 msgid ""
1295 "B<#include E<lt>sys/types.hE<gt>>\n"
1296 "B<#include E<lt>pwd.hE<gt>>\n"
1297 msgstr ""
1298
1299 #. type: Plain text
1300 #: build/C/man3/getpwent.3:40
1301 #, no-wrap
1302 msgid "B<struct passwd *getpwent(void);>\n"
1303 msgstr ""
1304
1305 #. type: Plain text
1306 #: build/C/man3/getpwent.3:42
1307 #, no-wrap
1308 msgid "B<void setpwent(void);>\n"
1309 msgstr ""
1310
1311 #. type: Plain text
1312 #: build/C/man3/getpwent.3:44
1313 #, no-wrap
1314 msgid "B<void endpwent(void);>\n"
1315 msgstr ""
1316
1317 #. type: Plain text
1318 #: build/C/man3/getpwent.3:55
1319 msgid "B<getpwent>(), B<setpwent>(), B<endpwent>():"
1320 msgstr ""
1321
1322 #. type: Plain text
1323 #: build/C/man3/getpwent.3:58
1324 msgid ""
1325 "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
1326 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
1327 msgstr ""
1328
1329 #. type: Plain text
1330 #: build/C/man3/getpwent.3:72
1331 msgid ""
1332 "The B<getpwent>()  function returns a pointer to a structure containing the "
1333 "broken-out fields of a record from the password database (e.g., the local "
1334 "password file I</etc/passwd>, NIS, and LDAP).  The first time B<getpwent>()  "
1335 "is called, it returns the first entry; thereafter, it returns successive "
1336 "entries."
1337 msgstr ""
1338
1339 #. type: Plain text
1340 #: build/C/man3/getpwent.3:77
1341 msgid ""
1342 "The B<setpwent>()  function rewinds to the beginning of the password "
1343 "database."
1344 msgstr ""
1345
1346 #. type: Plain text
1347 #: build/C/man3/getpwent.3:82
1348 msgid ""
1349 "The B<endpwent>()  function is used to close the password database after all "
1350 "processing has been performed."
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: build/C/man3/getpwent.3:114
1355 msgid ""
1356 "The B<getpwent>()  function returns a pointer to a I<passwd> structure, or "
1357 "NULL if there are no more entries or an error occurs.  If an error occurs, "
1358 "I<errno> is set appropriately.  If one wants to check I<errno> after the "
1359 "call, it should be set to zero before the call."
1360 msgstr ""
1361
1362 #. type: Plain text
1363 #: build/C/man3/getpwent.3:123
1364 msgid ""
1365 "The return value may point to a static area, and may be overwritten by "
1366 "subsequent calls to B<getpwent>(), B<getpwnam>(3), or B<getpwuid>(3).  (Do "
1367 "not pass the returned pointer to B<free>(3).)"
1368 msgstr ""
1369
1370 #. type: Plain text
1371 #: build/C/man3/getpwent.3:152 build/C/man3/getpwnam.3:209
1372 msgid "local password database file"
1373 msgstr ""
1374
1375 #. type: Plain text
1376 #: build/C/man3/getpwent.3:157 build/C/man3/getpwnam.3:214
1377 msgid ""
1378 "SVr4, 4.3BSD, POSIX.1-2001.  The I<pw_gecos> field is not specified in "
1379 "POSIX, but is present on most implementations."
1380 msgstr ""
1381
1382 #. type: Plain text
1383 #: build/C/man3/getpwent.3:164
1384 msgid ""
1385 "B<fgetpwent>(3), B<getpw>(3), B<getpwent_r>(3), B<getpwnam>(3), "
1386 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1387 msgstr ""
1388
1389 #. type: TH
1390 #: build/C/man3/getpwent_r.3:23
1391 #, no-wrap
1392 msgid "GETPWENT_R"
1393 msgstr ""
1394
1395 #. type: Plain text
1396 #: build/C/man3/getpwent_r.3:26
1397 msgid "getpwent_r, fgetpwent_r - get passwd file entry reentrantly"
1398 msgstr ""
1399
1400 #. type: Plain text
1401 #: build/C/man3/getpwent_r.3:29
1402 #, no-wrap
1403 msgid "B<#include E<lt>pwd.hE<gt>>\n"
1404 msgstr ""
1405
1406 #. type: Plain text
1407 #: build/C/man3/getpwent_r.3:31
1408 #, no-wrap
1409 msgid "B<int getpwent_r(struct passwd *>I<pwbuf>B<, char *>I<buf>B<,>\n"
1410 msgstr ""
1411
1412 #. type: Plain text
1413 #: build/C/man3/getpwent_r.3:33
1414 #, no-wrap
1415 msgid "B<               size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1416 msgstr ""
1417
1418 #. type: Plain text
1419 #: build/C/man3/getpwent_r.3:35
1420 #, no-wrap
1421 msgid ""
1422 "B<int fgetpwent_r(FILE *>I<fp>B<, struct passwd *>I<pwbuf>B<, char "
1423 "*>I<buf>B<,>\n"
1424 msgstr ""
1425
1426 #. type: Plain text
1427 #: build/C/man3/getpwent_r.3:37
1428 #, no-wrap
1429 msgid "B<                size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1430 msgstr ""
1431
1432 #. type: Plain text
1433 #: build/C/man3/getpwent_r.3:46
1434 msgid "B<getpwent_r>(), _BSD_SOURCE || _SVID_SOURCE"
1435 msgstr ""
1436
1437 #. type: Plain text
1438 #: build/C/man3/getpwent_r.3:49
1439 msgid "B<fgetpwent_r>(): _SVID_SOURCE"
1440 msgstr ""
1441
1442 #. type: Plain text
1443 #: build/C/man3/getpwent_r.3:62
1444 msgid ""
1445 "The functions B<getpwent_r>()  and B<fgetpwent_r>()  are the reentrant "
1446 "versions of B<getpwent>(3)  and B<fgetpwent>(3).  The former reads the next "
1447 "passwd entry from the stream initialized by B<setpwent>(3).  The latter "
1448 "reads the next passwd entry from the stream I<fp>."
1449 msgstr ""
1450
1451 #. type: Plain text
1452 #: build/C/man3/getpwent_r.3:78
1453 #, no-wrap
1454 msgid ""
1455 "struct passwd {\n"
1456 "    char    *pw_name;      /* username */\n"
1457 "    char    *pw_passwd;    /* user password */\n"
1458 "    uid_t    pw_uid;       /* user ID */\n"
1459 "    gid_t    pw_gid;       /* group ID */\n"
1460 "    char    *pw_gecos;     /* user information */\n"
1461 "    char    *pw_dir;       /* home directory */\n"
1462 "    char    *pw_shell;     /* shell program */\n"
1463 "};\n"
1464 msgstr ""
1465
1466 #. type: Plain text
1467 #: build/C/man3/getpwent_r.3:102
1468 msgid ""
1469 "The nonreentrant functions return a pointer to static storage, where this "
1470 "static storage contains further pointers to user name, password, gecos "
1471 "field, home directory and shell.  The reentrant functions described here "
1472 "return all of that in caller-provided buffers.  First of all there is the "
1473 "buffer I<pwbuf> that can hold a I<struct passwd>.  And next the buffer "
1474 "I<buf> of size I<buflen> that can hold additional strings.  The result of "
1475 "these functions, the I<struct passwd> read from the stream, is stored in the "
1476 "provided buffer I<*pwbuf>, and a pointer to this I<struct passwd> is "
1477 "returned in I<*pwbufp>."
1478 msgstr ""
1479
1480 #. type: Plain text
1481 #: build/C/man3/getpwent_r.3:109
1482 msgid ""
1483 "On success, these functions return 0 and I<*pwbufp> is a pointer to the "
1484 "I<struct passwd>.  On error, these functions return an error value and "
1485 "I<*pwbufp> is NULL."
1486 msgstr ""
1487
1488 #. type: Plain text
1489 #: build/C/man3/getpwent_r.3:127
1490 #, no-wrap
1491 msgid ""
1492 "struct passwd *\n"
1493 "getpwent_r(struct passwd *pwd, char *buf, int buflen);\n"
1494 msgstr ""
1495
1496 #. type: Plain text
1497 #: build/C/man3/getpwent_r.3:137
1498 #, no-wrap
1499 msgid ""
1500 "int\n"
1501 "getpwent_r(struct passwd *pwd, char *buf, int buflen,\n"
1502 "           FILE **pw_fp);\n"
1503 msgstr ""
1504
1505 #. type: Plain text
1506 #: build/C/man3/getpwent_r.3:144
1507 msgid ""
1508 "The function B<getpwent_r>()  is not really reentrant since it shares the "
1509 "reading position in the stream with all other threads."
1510 msgstr ""
1511
1512 #. type: Plain text
1513 #: build/C/man3/getpwent_r.3:150
1514 #, no-wrap
1515 msgid ""
1516 "#define _GNU_SOURCE\n"
1517 "#include E<lt>pwd.hE<gt>\n"
1518 "#include E<lt>stdio.hE<gt>\n"
1519 "#define BUFLEN 4096\n"
1520 msgstr ""
1521
1522 #. type: Plain text
1523 #: build/C/man3/getpwent_r.3:157
1524 #, no-wrap
1525 msgid ""
1526 "int\n"
1527 "main(void)\n"
1528 "{\n"
1529 "    struct passwd pw, *pwp;\n"
1530 "    char buf[BUFLEN];\n"
1531 "    int i;\n"
1532 msgstr ""
1533
1534 #. type: Plain text
1535 #: build/C/man3/getpwent_r.3:169
1536 #, no-wrap
1537 msgid ""
1538 "    setpwent();\n"
1539 "    while (1) {\n"
1540 "        i = getpwent_r(&pw, buf, BUFLEN, &pwp);\n"
1541 "        if (i)\n"
1542 "            break;\n"
1543 "        printf(\"%s (%d)\\etHOME %s\\etSHELL %s\\en\", pwp-E<gt>pw_name,\n"
1544 "               pwp-E<gt>pw_uid, pwp-E<gt>pw_dir, pwp-E<gt>pw_shell);\n"
1545 "    }\n"
1546 "    endpwent();\n"
1547 "    exit(EXIT_SUCCESS);\n"
1548 "}\n"
1549 msgstr ""
1550
1551 #. type: Plain text
1552 #: build/C/man3/getpwent_r.3:186
1553 msgid ""
1554 "B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), B<getpwnam>(3), "
1555 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1556 msgstr ""
1557
1558 #. type: TH
1559 #: build/C/man3/getpwnam.3:35
1560 #, no-wrap
1561 msgid "GETPWNAM"
1562 msgstr ""
1563
1564 #. type: Plain text
1565 #: build/C/man3/getpwnam.3:38
1566 msgid "getpwnam, getpwnam_r, getpwuid, getpwuid_r - get password file entry"
1567 msgstr ""
1568
1569 #. type: Plain text
1570 #: build/C/man3/getpwnam.3:44
1571 #, no-wrap
1572 msgid "B<struct passwd *getpwnam(const char *>I<name>B<);>\n"
1573 msgstr ""
1574
1575 #. type: Plain text
1576 #: build/C/man3/getpwnam.3:46
1577 #, no-wrap
1578 msgid "B<struct passwd *getpwuid(uid_t >I<uid>B<);>\n"
1579 msgstr ""
1580
1581 #. type: Plain text
1582 #: build/C/man3/getpwnam.3:48
1583 #, no-wrap
1584 msgid "B<int getpwnam_r(const char *>I<name>B<, struct passwd *>I<pwd>B<,>\n"
1585 msgstr ""
1586
1587 #. type: Plain text
1588 #: build/C/man3/getpwnam.3:50 build/C/man3/getpwnam.3:54
1589 #, no-wrap
1590 msgid ""
1591 "B<            char *>I<buf>B<, size_t >I<buflen>B<, struct passwd "
1592 "**>I<result>B<);>\n"
1593 msgstr ""
1594
1595 #. type: Plain text
1596 #: build/C/man3/getpwnam.3:52
1597 #, no-wrap
1598 msgid "B<int getpwuid_r(uid_t >I<uid>B<, struct passwd *>I<pwd>B<,>\n"
1599 msgstr ""
1600
1601 #. type: Plain text
1602 #: build/C/man3/getpwnam.3:64
1603 msgid "B<getpwnam_r>(), B<getpwuid_r>():"
1604 msgstr ""
1605
1606 #. type: Plain text
1607 #: build/C/man3/getpwnam.3:79
1608 msgid ""
1609 "The B<getpwnam>()  function returns a pointer to a structure containing the "
1610 "broken-out fields of the record in the password database (e.g., the local "
1611 "password file I</etc/passwd>, NIS, and LDAP)  that matches the username "
1612 "I<name>."
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: build/C/man3/getpwnam.3:86
1617 msgid ""
1618 "The B<getpwuid>()  function returns a pointer to a structure containing the "
1619 "broken-out fields of the record in the password database that matches the "
1620 "user ID I<uid>."
1621 msgstr ""
1622
1623 #. type: Plain text
1624 #: build/C/man3/getpwnam.3:106
1625 msgid "See B<passwd>(5)  for more information about these fields."
1626 msgstr ""
1627
1628 #. type: Plain text
1629 #: build/C/man3/getpwnam.3:128
1630 msgid ""
1631 "The B<getpwnam_r>()  and B<getpwuid_r>()  functions obtain the same "
1632 "information as B<getpwnam>()  and B<getpwuid>(), but store the retrieved "
1633 "I<passwd> structure in the space pointed to by I<pwd>.  The string fields "
1634 "pointed to by the members of the I<passwd> structure are stored in the "
1635 "buffer I<buf> of size I<buflen>.  A pointer to the result (in case of "
1636 "success) or NULL (in case no entry was found or an error occurred) is stored "
1637 "in I<*result>."
1638 msgstr ""
1639
1640 #. type: Plain text
1641 #: build/C/man3/getpwnam.3:135
1642 msgid ""
1643 "The maximum size needed for I<buf> can be found using B<sysconf>(3)  with "
1644 "the argument B<_SC_GETPW_R_SIZE_MAX>."
1645 msgstr ""
1646
1647 #. type: Plain text
1648 #: build/C/man3/getpwnam.3:150
1649 msgid ""
1650 "The B<getpwnam>()  and B<getpwuid>()  functions return a pointer to a "
1651 "I<passwd> structure, or NULL if the matching entry is not found or an error "
1652 "occurs.  If an error occurs, I<errno> is set appropriately.  If one wants to "
1653 "check I<errno> after the call, it should be set to zero before the call."
1654 msgstr ""
1655
1656 #. type: Plain text
1657 #: build/C/man3/getpwnam.3:159
1658 msgid ""
1659 "The return value may point to a static area, and may be overwritten by "
1660 "subsequent calls to B<getpwent>(3), B<getpwnam>(), or B<getpwuid>().  (Do "
1661 "not pass the returned pointer to B<free>(3).)"
1662 msgstr ""
1663
1664 #. type: Plain text
1665 #: build/C/man3/getpwnam.3:173
1666 msgid ""
1667 "On success, B<getpwnam_r>()  and B<getpwuid_r>()  return zero, and set "
1668 "I<*result> to I<pwd>.  If no matching password record was found, these "
1669 "functions return 0 and store NULL in I<*result>.  In case of error, an error "
1670 "number is returned, and NULL is stored in I<*result>."
1671 msgstr ""
1672
1673 #. type: Plain text
1674 #: build/C/man3/getpwnam.3:181
1675 msgid "The given I<name> or I<uid> was not found."
1676 msgstr ""
1677
1678 #.  more precisely:
1679 #.  AIX 5.1 - gives ESRCH
1680 #.  OSF1 4.0g - gives EWOULDBLOCK
1681 #.  libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
1682 #.  glibc since version 2.7 - give 0
1683 #.  FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
1684 #.  SunOS 5.8 - gives EBADF
1685 #.  Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
1686 #. type: Plain text
1687 #: build/C/man3/getpwnam.3:235
1688 msgid ""
1689 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001.  It "
1690 "does not call \"not found\" an error, and hence does not specify what value "
1691 "I<errno> might have in this situation.  But that makes it impossible to "
1692 "recognize errors.  One might argue that according to POSIX I<errno> should "
1693 "be left unchanged if an entry is not found.  Experiments on various "
1694 "UNIX-like systems show that lots of different values occur in this "
1695 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
1696 msgstr ""
1697
1698 #. type: Plain text
1699 #: build/C/man3/getpwnam.3:253
1700 msgid ""
1701 "The I<pw_dir> field contains the name of the initial working directory of "
1702 "the user.  Login programs use the value of this field to initialize the "
1703 "B<HOME> environment variable for the login shell.  An application that wants "
1704 "to determine its user's home directory should inspect the value of B<HOME> "
1705 "(rather than the value I<getpwuid(getuid())-E<gt>pw_dir>)  since this allows "
1706 "the user to modify their notion of \"the home directory\" during a login "
1707 "session.  To determine the (initial) home directory of another user, it is "
1708 "necessary to use I<getpwnam(\"username\")-E<gt>pw_dir> or similar."
1709 msgstr ""
1710
1711 #. type: Plain text
1712 #: build/C/man3/getpwnam.3:258
1713 msgid ""
1714 "The program below demonstrates the use of B<getpwnam_r>()  to find the full "
1715 "username and user ID for the username supplied as a command-line argument."
1716 msgstr ""
1717
1718 #. type: Plain text
1719 #: build/C/man3/getpwnam.3:265
1720 #, no-wrap
1721 msgid ""
1722 "#include E<lt>pwd.hE<gt>\n"
1723 "#include E<lt>stdio.hE<gt>\n"
1724 "#include E<lt>stdlib.hE<gt>\n"
1725 "#include E<lt>unistd.hE<gt>\n"
1726 "#include E<lt>errno.hE<gt>\n"
1727 msgstr ""
1728
1729 #. type: Plain text
1730 #: build/C/man3/getpwnam.3:274
1731 #, no-wrap
1732 msgid ""
1733 "int\n"
1734 "main(int argc, char *argv[])\n"
1735 "{\n"
1736 "    struct passwd pwd;\n"
1737 "    struct passwd *result;\n"
1738 "    char *buf;\n"
1739 "    size_t bufsize;\n"
1740 "    int s;\n"
1741 msgstr ""
1742
1743 #. type: Plain text
1744 #: build/C/man3/getpwnam.3:279
1745 #, no-wrap
1746 msgid ""
1747 "    if (argc != 2) {\n"
1748 "        fprintf(stderr, \"Usage: %s username\\en\", argv[0]);\n"
1749 "        exit(EXIT_FAILURE);\n"
1750 "    }\n"
1751 msgstr ""
1752
1753 #. type: Plain text
1754 #: build/C/man3/getpwnam.3:283
1755 #, no-wrap
1756 msgid ""
1757 "    bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);\n"
1758 "    if (bufsize == -1)          /* Value was indeterminate */\n"
1759 "        bufsize = 16384;        /* Should be more than enough */\n"
1760 msgstr ""
1761
1762 #. type: Plain text
1763 #: build/C/man3/getpwnam.3:289
1764 #, no-wrap
1765 msgid ""
1766 "    buf = malloc(bufsize);\n"
1767 "    if (buf == NULL) {\n"
1768 "        perror(\"malloc\");\n"
1769 "        exit(EXIT_FAILURE);\n"
1770 "    }\n"
1771 msgstr ""
1772
1773 #. type: Plain text
1774 #: build/C/man3/getpwnam.3:300
1775 #, no-wrap
1776 msgid ""
1777 "    s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);\n"
1778 "    if (result == NULL) {\n"
1779 "        if (s == 0)\n"
1780 "            printf(\"Not found\\en\");\n"
1781 "        else {\n"
1782 "            errno = s;\n"
1783 "            perror(\"getpwnam_r\");\n"
1784 "        }\n"
1785 "        exit(EXIT_FAILURE);\n"
1786 "    }\n"
1787 msgstr ""
1788
1789 #. type: Plain text
1790 #: build/C/man3/getpwnam.3:304
1791 #, no-wrap
1792 msgid ""
1793 "    printf(\"Name: %s; UID: %ld\\en\", pwd.pw_gecos, (long) pwd.pw_uid);\n"
1794 "    exit(EXIT_SUCCESS);\n"
1795 "}\n"
1796 msgstr ""
1797
1798 #. type: Plain text
1799 #: build/C/man3/getpwnam.3:314
1800 msgid ""
1801 "B<endpwent>(3), B<fgetpwent>(3), B<getgrnam>(3), B<getpw>(3), "
1802 "B<getpwent>(3), B<getspnam>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1803 msgstr ""
1804
1805 #. type: TH
1806 #: build/C/man3/getspnam.3:6
1807 #, no-wrap
1808 msgid "GETSPNAM"
1809 msgstr ""
1810
1811 #. type: TH
1812 #: build/C/man3/getspnam.3:6
1813 #, no-wrap
1814 msgid "2010-02-25"
1815 msgstr ""
1816
1817 #. type: Plain text
1818 #: build/C/man3/getspnam.3:11
1819 msgid ""
1820 "getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, fgetspent, "
1821 "fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf - get "
1822 "shadow password file entry"
1823 msgstr ""
1824
1825 #. type: Plain text
1826 #: build/C/man3/getspnam.3:14
1827 #, no-wrap
1828 msgid "/* General shadow password file API */\n"
1829 msgstr ""
1830
1831 #. type: Plain text
1832 #: build/C/man3/getspnam.3:16 build/C/man3/getspnam.3:38
1833 #, no-wrap
1834 msgid "B<#include E<lt>shadow.hE<gt>>\n"
1835 msgstr ""
1836
1837 #. type: Plain text
1838 #: build/C/man3/getspnam.3:18
1839 #, no-wrap
1840 msgid "B<struct spwd *getspnam(const char *>I<name>B<);>\n"
1841 msgstr ""
1842
1843 #. type: Plain text
1844 #: build/C/man3/getspnam.3:20
1845 #, no-wrap
1846 msgid "B<struct spwd *getspent(void);>\n"
1847 msgstr ""
1848
1849 #. type: Plain text
1850 #: build/C/man3/getspnam.3:22
1851 #, no-wrap
1852 msgid "B<void setspent(void);>\n"
1853 msgstr ""
1854
1855 #. type: Plain text
1856 #: build/C/man3/getspnam.3:24
1857 #, no-wrap
1858 msgid "B<void endspent(void);>\n"
1859 msgstr ""
1860
1861 #. type: Plain text
1862 #: build/C/man3/getspnam.3:26
1863 #, no-wrap
1864 msgid "B<struct spwd *fgetspent(FILE *>I<fp>B<);>\n"
1865 msgstr ""
1866
1867 #. type: Plain text
1868 #: build/C/man3/getspnam.3:28
1869 #, no-wrap
1870 msgid "B<struct spwd *sgetspent(const char *>I<s>B<);>\n"
1871 msgstr ""
1872
1873 #. type: Plain text
1874 #: build/C/man3/getspnam.3:30
1875 #, no-wrap
1876 msgid "B<int putspent(struct spwd *>I<p>B<, FILE *>I<fp>B<);>\n"
1877 msgstr ""
1878
1879 #. type: Plain text
1880 #: build/C/man3/getspnam.3:32
1881 #, no-wrap
1882 msgid "B<int lckpwdf(void);>\n"
1883 msgstr ""
1884
1885 #. type: Plain text
1886 #: build/C/man3/getspnam.3:34
1887 #, no-wrap
1888 msgid "B<int ulckpwdf(void);>\n"
1889 msgstr ""
1890
1891 #. type: Plain text
1892 #: build/C/man3/getspnam.3:36
1893 #, no-wrap
1894 msgid "/* GNU extension */\n"
1895 msgstr ""
1896
1897 #. type: Plain text
1898 #: build/C/man3/getspnam.3:40
1899 #, no-wrap
1900 msgid "B<int getspent_r(struct spwd *>I<spbuf>B<,>\n"
1901 msgstr ""
1902
1903 #. type: Plain text
1904 #: build/C/man3/getspnam.3:42 build/C/man3/getspnam.3:46 build/C/man3/getspnam.3:50 build/C/man3/getspnam.3:54
1905 #, no-wrap
1906 msgid ""
1907 "B<        char *>I<buf>B<, size_t >I<buflen>B<, struct spwd "
1908 "**>I<spbufp>B<);>\n"
1909 msgstr ""
1910
1911 #. type: Plain text
1912 #: build/C/man3/getspnam.3:44
1913 #, no-wrap
1914 msgid "B<int getspnam_r(const char *>I<name>B<, struct spwd *>I<spbuf>B<,>\n"
1915 msgstr ""
1916
1917 #. type: Plain text
1918 #: build/C/man3/getspnam.3:48
1919 #, no-wrap
1920 msgid "B<int fgetspent_r(FILE *>I<fp>B<, struct spwd *>I<spbuf>B<,>\n"
1921 msgstr ""
1922
1923 #. type: Plain text
1924 #: build/C/man3/getspnam.3:52
1925 #, no-wrap
1926 msgid "B<int sgetspent_r(const char *>I<s>B<, struct spwd *>I<spbuf>B<,>\n"
1927 msgstr ""
1928
1929 #. type: Plain text
1930 #: build/C/man3/getspnam.3:66
1931 msgid "B<getspent_r>(), B<getspnam_r>(), B<fgetspent_r>(), B<sgetspent_r>():"
1932 msgstr ""
1933
1934 #. type: Plain text
1935 #: build/C/man3/getspnam.3:68
1936 msgid "_BSD_SOURCE || _SVID_SOURCE"
1937 msgstr ""
1938
1939 #. type: Plain text
1940 #: build/C/man3/getspnam.3:82
1941 msgid ""
1942 "Long ago it was considered safe to have encrypted passwords openly visible "
1943 "in the password file.  When computers got faster and people got more "
1944 "security-conscious, this was no longer acceptable.  Julianne Frances Haugh "
1945 "implemented the shadow password suite that keeps the encrypted passwords in "
1946 "the shadow password database (e.g., the local shadow password file "
1947 "I</etc/shadow>, NIS, and LDAP), readable only by root."
1948 msgstr ""
1949
1950 #.  FIXME I've commented out the following for the
1951 #.  moment.  The relationship between PAM and nsswitch.conf needs
1952 #.  to be clearly documented in one place, which is pointed to by
1953 #.  the pages for the user, group, and shadow password functions.
1954 #.  (Jul 2005, mtk)
1955 #
1956 #.  This shadow password setup has been superseded by PAM
1957 #.  (pluggable authentication modules), and the file
1958 #.  .I /etc/nsswitch.conf
1959 #.  now describes the sources to be used.
1960 #. type: Plain text
1961 #: build/C/man3/getspnam.3:99
1962 msgid ""
1963 "The functions described below resemble those for the traditional password "
1964 "database (e.g., see B<getpwnam>(3)  and B<getpwent>(3))."
1965 msgstr ""
1966
1967 #. type: Plain text
1968 #: build/C/man3/getspnam.3:106
1969 msgid ""
1970 "The B<getspnam>()  function returns a pointer to a structure containing the "
1971 "broken-out fields of the record in the shadow password database that matches "
1972 "the username I<name>."
1973 msgstr ""
1974
1975 #.  some systems require a call of setspent() before the first getspent()
1976 #.  glibc does not
1977 #. type: Plain text
1978 #: build/C/man3/getspnam.3:118
1979 msgid ""
1980 "The B<getspent>()  function returns a pointer to the next entry in the "
1981 "shadow password database.  The position in the input stream is initialized "
1982 "by B<setspent>().  When done reading, the program may call B<endspent>()  so "
1983 "that resources can be deallocated."
1984 msgstr ""
1985
1986 #. type: Plain text
1987 #: build/C/man3/getspnam.3:125
1988 msgid ""
1989 "The B<fgetspent>()  function is similar to B<getspent>()  but uses the "
1990 "supplied stream instead of the one implicitly opened by B<setspent>()."
1991 msgstr ""
1992
1993 #. type: Plain text
1994 #: build/C/man3/getspnam.3:132
1995 msgid ""
1996 "The B<sgetspent>()  function parses the supplied string I<s> into a struct "
1997 "I<spwd>."
1998 msgstr ""
1999
2000 #. type: Plain text
2001 #: build/C/man3/getspnam.3:142
2002 msgid ""
2003 "The B<putspent>()  function writes the contents of the supplied struct "
2004 "I<spwd> I<*p> as a text line in the shadow password file format to the "
2005 "stream I<fp>.  String entries with value NULL and numerical entries with "
2006 "value -1 are written as an empty string."
2007 msgstr ""
2008
2009 #. type: Plain text
2010 #: build/C/man3/getspnam.3:157
2011 msgid ""
2012 "The B<lckpwdf>()  function is intended to protect against multiple "
2013 "simultaneous accesses of the shadow password database.  It tries to acquire "
2014 "a lock, and returns 0 on success, or -1 on failure (lock not obtained within "
2015 "15 seconds).  The B<ulckpwdf>()  function releases the lock again.  Note "
2016 "that there is no protection against direct access of the shadow password "
2017 "file.  Only programs that use B<lckpwdf>()  will notice the lock."
2018 msgstr ""
2019
2020 #.  Also in libc5
2021 #.  SUN doesn't have sgetspent()
2022 #. type: Plain text
2023 #: build/C/man3/getspnam.3:162
2024 msgid ""
2025 "These were the functions that formed the original shadow API.  They are "
2026 "widely available."
2027 msgstr ""
2028
2029 #. type: SS
2030 #: build/C/man3/getspnam.3:162
2031 #, no-wrap
2032 msgid "Reentrant versions"
2033 msgstr ""
2034
2035 #. type: Plain text
2036 #: build/C/man3/getspnam.3:179
2037 msgid ""
2038 "Analogous to the reentrant functions for the password database, glibc also "
2039 "has reentrant functions for the shadow password database.  The "
2040 "B<getspnam_r>()  function is like B<getspnam>()  but stores the retrieved "
2041 "shadow password structure in the space pointed to by I<spbuf>.  This shadow "
2042 "password structure contains pointers to strings, and these strings are "
2043 "stored in the buffer I<buf> of size I<buflen>.  A pointer to the result (in "
2044 "case of success) or NULL (in case no entry was found or an error occurred) "
2045 "is stored in I<*spbufp>."
2046 msgstr ""
2047
2048 #. type: Plain text
2049 #: build/C/man3/getspnam.3:186
2050 msgid ""
2051 "The functions B<getspent_r>(), B<fgetspent_r>(), and B<sgetspent_r>()  are "
2052 "similarly analogous to their nonreentrant counterparts."
2053 msgstr ""
2054
2055 #.  SUN doesn't have sgetspent_r()
2056 #. type: Plain text
2057 #: build/C/man3/getspnam.3:190
2058 msgid ""
2059 "Some non-glibc systems also have functions with these names, often with "
2060 "different prototypes."
2061 msgstr ""
2062
2063 #. type: SS
2064 #: build/C/man3/getspnam.3:190
2065 #, no-wrap
2066 msgid "Structure"
2067 msgstr ""
2068
2069 #. type: Plain text
2070 #: build/C/man3/getspnam.3:192
2071 msgid ""
2072 "The shadow password structure is defined in I<E<lt>shadow.hE<gt>> as "
2073 "follows:"
2074 msgstr ""
2075
2076 #. type: Plain text
2077 #: build/C/man3/getspnam.3:210
2078 #, no-wrap
2079 msgid ""
2080 "struct spwd {\n"
2081 "    char *sp_namp;     /* Login name */\n"
2082 "    char *sp_pwdp;     /* Encrypted password */\n"
2083 "    long  sp_lstchg;   /* Date of last change (measured\n"
2084 "                          in days since 1970-01-01 00:00:00 +0000 (UTC)) "
2085 "*/\n"
2086 "    long  sp_min;      /* Min # of days between changes */\n"
2087 "    long  sp_max;      /* Max # of days between changes */\n"
2088 "    long  sp_warn;     /* # of days before password expires\n"
2089 "                          to warn user to change it */\n"
2090 "    long  sp_inact;    /* # of days after password expires\n"
2091 "                          until account is disabled */\n"
2092 "    long  sp_expire;   /* Date when account expires (measured\n"
2093 "                          in days since 1970-01-01 00:00:00 +0000 (UTC)) "
2094 "*/\n"
2095 "    unsigned long sp_flag;  /* Reserved */\n"
2096 "};\n"
2097 msgstr ""
2098
2099 #. type: Plain text
2100 #: build/C/man3/getspnam.3:217
2101 msgid ""
2102 "The functions that return a pointer return NULL if no more entries are "
2103 "available or if an error occurs during processing.  The functions which have "
2104 "I<int> as the return value return 0 for success and -1 for failure."
2105 msgstr ""
2106
2107 #. type: Plain text
2108 #: build/C/man3/getspnam.3:220
2109 msgid ""
2110 "For the nonreentrant functions, the return value may point to static area, "
2111 "and may be overwritten by subsequent calls to these functions."
2112 msgstr ""
2113
2114 #. type: Plain text
2115 #: build/C/man3/getspnam.3:223
2116 msgid ""
2117 "The reentrant functions return zero on success.  In case of error, an error "
2118 "number is returned."
2119 msgstr ""
2120
2121 #. type: Plain text
2122 #: build/C/man3/getspnam.3:227
2123 msgid "Supplied buffer is too small."
2124 msgstr ""
2125
2126 #. type: TP
2127 #: build/C/man3/getspnam.3:228
2128 #, no-wrap
2129 msgid "I</etc/shadow>"
2130 msgstr ""
2131
2132 #. type: Plain text
2133 #: build/C/man3/getspnam.3:231
2134 msgid "local shadow password database file"
2135 msgstr ""
2136
2137 #. type: TP
2138 #: build/C/man3/getspnam.3:231
2139 #, no-wrap
2140 msgid "I</etc/.pwd.lock>"
2141 msgstr ""
2142
2143 #. type: Plain text
2144 #: build/C/man3/getspnam.3:234
2145 msgid "lock file"
2146 msgstr ""
2147
2148 #. type: Plain text
2149 #: build/C/man3/getspnam.3:240
2150 msgid ""
2151 "The include file I<E<lt>paths.hE<gt>> defines the constant B<_PATH_SHADOW> "
2152 "to the pathname of the shadow password file."
2153 msgstr ""
2154
2155 #. type: Plain text
2156 #: build/C/man3/getspnam.3:244
2157 msgid ""
2158 "The shadow password database and its associated API are not specified in "
2159 "POSIX.1-2001.  However, many other systems provide a similar API."
2160 msgstr ""
2161
2162 #. type: Plain text
2163 #: build/C/man3/getspnam.3:248
2164 msgid "B<getgrnam>(3), B<getpwnam>(3), B<getpwnam_r>(3), B<shadow>(5)"
2165 msgstr ""
2166
2167 #. type: TH
2168 #: build/C/man5/group.5:25
2169 #, no-wrap
2170 msgid "GROUP"
2171 msgstr ""
2172
2173 #. type: Plain text
2174 #: build/C/man5/group.5:28
2175 msgid "group - user group file"
2176 msgstr ""
2177
2178 #. type: Plain text
2179 #: build/C/man5/group.5:33
2180 msgid ""
2181 "The I</etc/group> file is a text file that defines the groups on the "
2182 "system.  There is one entry per line, with the following format:"
2183 msgstr ""
2184
2185 #. type: Plain text
2186 #: build/C/man5/group.5:36
2187 msgid "group_name:password:GID:user_list"
2188 msgstr ""
2189
2190 #. type: Plain text
2191 #: build/C/man5/group.5:39
2192 msgid "The fields are as follows:"
2193 msgstr ""
2194
2195 #. type: TP
2196 #: build/C/man5/group.5:39
2197 #, no-wrap
2198 msgid "I<group_name>"
2199 msgstr ""
2200
2201 #. type: Plain text
2202 #: build/C/man5/group.5:42
2203 msgid "the name of the group."
2204 msgstr ""
2205
2206 #. type: TP
2207 #: build/C/man5/group.5:42 build/C/man5/passwd.5:75
2208 #, no-wrap
2209 msgid "I<password>"
2210 msgstr ""
2211
2212 #. type: Plain text
2213 #: build/C/man5/group.5:46
2214 msgid ""
2215 "the (encrypted) group password.  If this field is empty, no password is "
2216 "needed."
2217 msgstr ""
2218
2219 #. type: TP
2220 #: build/C/man5/group.5:46 build/C/man5/passwd.5:84
2221 #, no-wrap
2222 msgid "I<GID>"
2223 msgstr ""
2224
2225 #. type: Plain text
2226 #: build/C/man5/group.5:49
2227 msgid "the numeric group ID."
2228 msgstr ""
2229
2230 #. type: TP
2231 #: build/C/man5/group.5:49
2232 #, no-wrap
2233 msgid "I<user_list>"
2234 msgstr ""
2235
2236 #. type: Plain text
2237 #: build/C/man5/group.5:52
2238 msgid "a list of the usernames that are members of this group, separated by commas."
2239 msgstr ""
2240
2241 #. type: Plain text
2242 #: build/C/man5/group.5:54
2243 msgid "/etc/group"
2244 msgstr ""
2245
2246 #. type: Plain text
2247 #: build/C/man5/group.5:60
2248 msgid ""
2249 "As the 4.2BSD B<initgroups>(3)  man page says: No-one seems to keep "
2250 "I</etc/group> up-to-date."
2251 msgstr ""
2252
2253 #. type: Plain text
2254 #: build/C/man5/group.5:65
2255 msgid "B<login>(1), B<newgrp>(1), B<getgrent>(3), B<getgrnam>(3), B<passwd>(5)"
2256 msgstr ""
2257
2258 #. type: TH
2259 #: build/C/man3/initgroups.3:30
2260 #, no-wrap
2261 msgid "INITGROUPS"
2262 msgstr ""
2263
2264 #. type: TH
2265 #: build/C/man3/initgroups.3:30 build/C/man3/putpwent.3:28
2266 #, no-wrap
2267 msgid "2007-07-26"
2268 msgstr ""
2269
2270 #. type: Plain text
2271 #: build/C/man3/initgroups.3:33
2272 msgid "initgroups - initialize the supplementary group access list"
2273 msgstr ""
2274
2275 #. type: Plain text
2276 #: build/C/man3/initgroups.3:39
2277 #, no-wrap
2278 msgid "B<int initgroups(const char *>I<user>B<, gid_t >I<group>B<);>\n"
2279 msgstr ""
2280
2281 #. type: Plain text
2282 #: build/C/man3/initgroups.3:48
2283 msgid "B<initgroups>(): _BSD_SOURCE"
2284 msgstr ""
2285
2286 #. type: Plain text
2287 #: build/C/man3/initgroups.3:56
2288 msgid ""
2289 "The B<initgroups>()  function initializes the group access list by reading "
2290 "the group database I</etc/group> and using all groups of which I<user> is a "
2291 "member.  The additional group I<group> is also added to the list."
2292 msgstr ""
2293
2294 #. type: Plain text
2295 #: build/C/man3/initgroups.3:60
2296 msgid "The I<user> argument must be non-NULL."
2297 msgstr ""
2298
2299 #. type: Plain text
2300 #: build/C/man3/initgroups.3:67
2301 msgid ""
2302 "The B<initgroups>()  function returns 0 on success.  On error, -1 is "
2303 "returned, and I<errno> is set appropriately."
2304 msgstr ""
2305
2306 #. type: Plain text
2307 #: build/C/man3/initgroups.3:71
2308 msgid "Insufficient memory to allocate group information structure."
2309 msgstr ""
2310
2311 #. type: TP
2312 #: build/C/man3/initgroups.3:71
2313 #, no-wrap
2314 msgid "B<EPERM>"
2315 msgstr ""
2316
2317 #. type: Plain text
2318 #: build/C/man3/initgroups.3:76
2319 msgid ""
2320 "The calling process has insufficient privilege.  See the underlying system "
2321 "call B<setgroups>(2)."
2322 msgstr ""
2323
2324 #. type: Plain text
2325 #: build/C/man3/initgroups.3:79
2326 #, no-wrap
2327 msgid "I</etc/group>\t\tgroup database file\n"
2328 msgstr ""
2329
2330 #. type: Plain text
2331 #: build/C/man3/initgroups.3:82
2332 msgid "SVr4, 4.3BSD."
2333 msgstr ""
2334
2335 #. type: Plain text
2336 #: build/C/man3/initgroups.3:85
2337 msgid "B<getgroups>(2), B<setgroups>(2), B<credentials>(7)"
2338 msgstr ""
2339
2340 #. type: TH
2341 #: build/C/man5/passwd.5:29
2342 #, no-wrap
2343 msgid "PASSWD"
2344 msgstr ""
2345
2346 #. type: TH
2347 #: build/C/man5/passwd.5:29
2348 #, no-wrap
2349 msgid "2012-02-14"
2350 msgstr ""
2351
2352 #. type: Plain text
2353 #: build/C/man5/passwd.5:32
2354 msgid "passwd - password file"
2355 msgstr ""
2356
2357 #. type: Plain text
2358 #: build/C/man5/passwd.5:40
2359 msgid ""
2360 "The I</etc/passwd> file is a text file that describes user login accounts "
2361 "for the system.  It should have read permission allowed for all users (many "
2362 "utilities, like B<ls>(1)  use it to map user IDs to usernames), but write "
2363 "access only for the superuser."
2364 msgstr ""
2365
2366 #. type: Plain text
2367 #: build/C/man5/passwd.5:52
2368 msgid ""
2369 "In the good old days there was no great problem with this general read "
2370 "permission.  Everybody could read the encrypted passwords, but the hardware "
2371 "was too slow to crack a well-chosen password, and moreover the basic "
2372 "assumption used to be that of a friendly user-community.  These days many "
2373 "people run some version of the shadow password suite, where I</etc/passwd> "
2374 "has an \\(aqx\\(aq character in the password field, and the encrypted "
2375 "passwords are in I</etc/shadow>, which is readable by the superuser only."
2376 msgstr ""
2377
2378 #. type: Plain text
2379 #: build/C/man5/passwd.5:58
2380 msgid ""
2381 "Regardless of whether shadow passwords are used, many system administrators "
2382 "use an asterisk (*) in the encrypted password field to make sure that this "
2383 "user can not authenticate him- or herself using a password.  (But see NOTES "
2384 "below.)"
2385 msgstr ""
2386
2387 #. type: Plain text
2388 #: build/C/man5/passwd.5:63
2389 msgid ""
2390 "If you create a new login, first put an asterisk (*) in the password field, "
2391 "then use B<passwd>(1)  to set it."
2392 msgstr ""
2393
2394 #. type: Plain text
2395 #: build/C/man5/passwd.5:65
2396 msgid "Each line of the file describes a single user, and has the following format:"
2397 msgstr ""
2398
2399 #. type: Plain text
2400 #: build/C/man5/passwd.5:68
2401 msgid "account:password:UID:GID:GECOS:directory:shell"
2402 msgstr ""
2403
2404 #. type: Plain text
2405 #: build/C/man5/passwd.5:71
2406 msgid "The field are as follows:"
2407 msgstr ""
2408
2409 #. type: TP
2410 #: build/C/man5/passwd.5:71
2411 #, no-wrap
2412 msgid "I<account>"
2413 msgstr ""
2414
2415 #. type: Plain text
2416 #: build/C/man5/passwd.5:75
2417 msgid "the name of the user on the system.  It should not contain capital letters."
2418 msgstr ""
2419
2420 #. type: Plain text
2421 #: build/C/man5/passwd.5:81
2422 msgid ""
2423 "the encrypted user password, an asterisk (*), or the letter \\(aqx\\(aq.  "
2424 "(See B<pwconv>(8)  for an explanation of \\(aqx\\(aq.)"
2425 msgstr ""
2426
2427 #. type: TP
2428 #: build/C/man5/passwd.5:81
2429 #, no-wrap
2430 msgid "I<UID>"
2431 msgstr ""
2432
2433 #. type: Plain text
2434 #: build/C/man5/passwd.5:84
2435 msgid "the numeric user ID."
2436 msgstr ""
2437
2438 #. type: Plain text
2439 #: build/C/man5/passwd.5:87
2440 msgid "the numeric primary group ID for this user."
2441 msgstr ""
2442
2443 #. type: TP
2444 #: build/C/man5/passwd.5:87
2445 #, no-wrap
2446 msgid "I<GECOS>"
2447 msgstr ""
2448
2449 #. type: Plain text
2450 #: build/C/man5/passwd.5:99
2451 msgid ""
2452 "This field is optional and used only for informational purposes.  Usually, "
2453 "it contains the full username.  GECOS stands for \"General Electric "
2454 "Comprehensive Operating System\", which was renamed to GCOS when GE's large "
2455 "systems division was sold to Honeywell.  Dennis Ritchie has reported: "
2456 "\"Sometimes we sent printer output or batch jobs to the GCOS machine.  The "
2457 "gcos field in the password file was a place to stash the information for the "
2458 "$IDENTcard.  Not elegant.\""
2459 msgstr ""
2460
2461 #. type: TP
2462 #: build/C/man5/passwd.5:99
2463 #, no-wrap
2464 msgid "I<directory>"
2465 msgstr ""
2466
2467 #. type: Plain text
2468 #: build/C/man5/passwd.5:104
2469 msgid "the user's B<$HOME> directory."
2470 msgstr ""
2471
2472 #. type: TP
2473 #: build/C/man5/passwd.5:104
2474 #, no-wrap
2475 msgid "I<shell>"
2476 msgstr ""
2477
2478 #. type: Plain text
2479 #: build/C/man5/passwd.5:111
2480 msgid ""
2481 "the program to run at login (if empty, use I</bin/sh>).  If set to a "
2482 "nonexistent executable, the user will be unable to login through "
2483 "B<login>(1)."
2484 msgstr ""
2485
2486 #. type: Plain text
2487 #: build/C/man5/passwd.5:117
2488 msgid ""
2489 "If you want to create user groups, there must be an entry in I</etc/group>, "
2490 "or no group will exist."
2491 msgstr ""
2492
2493 #. type: Plain text
2494 #: build/C/man5/passwd.5:131
2495 msgid ""
2496 "If the encrypted password is set to an asterisk (*), the user will be unable "
2497 "to login using B<login>(1), but may still login using B<rlogin>(1), run "
2498 "existing processes and initiate new ones through B<rsh>(1), B<cron>(8), "
2499 "B<at>(1), or mail filters, etc.  Trying to lock an account by simply "
2500 "changing the shell field yields the same result and additionally allows the "
2501 "use of B<su>(1)."
2502 msgstr ""
2503
2504 #. type: Plain text
2505 #: build/C/man5/passwd.5:138
2506 msgid ""
2507 "B<login>(1), B<passwd>(1), B<su>(1), B<getpwent>(3), B<getpwnam>(3), "
2508 "B<group>(5), B<shadow>(5)"
2509 msgstr ""
2510
2511 #. type: TH
2512 #: build/C/man3/putgrent.3:4
2513 #, no-wrap
2514 msgid "PUTGRENT"
2515 msgstr ""
2516
2517 #. type: TH
2518 #: build/C/man3/putgrent.3:4 build/C/man3/setaliasent.3:6
2519 #, no-wrap
2520 msgid "2003-09-09"
2521 msgstr ""
2522
2523 #. type: Plain text
2524 #: build/C/man3/putgrent.3:7
2525 msgid "putgrent - write a group database entry to a file"
2526 msgstr ""
2527
2528 #. type: Plain text
2529 #: build/C/man3/putgrent.3:9
2530 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
2531 msgstr ""
2532
2533 #. type: Plain text
2534 #: build/C/man3/putgrent.3:13
2535 msgid "B<int putgrent(const struct group *>I<grp>B<, FILE *>I<fp>B<);>"
2536 msgstr ""
2537
2538 #. type: Plain text
2539 #: build/C/man3/putgrent.3:22
2540 msgid ""
2541 "The B<putgrent>()  function is the counterpart for B<fgetgrent>(3).  The "
2542 "function writes the content of the provided I<struct group> into the file "
2543 "pointed to by I<fp>.  The list of group members must be NULL-terminated or "
2544 "NULL-initialized."
2545 msgstr ""
2546
2547 #. type: Plain text
2548 #: build/C/man3/putgrent.3:24
2549 msgid "The I<struct group> is defined as follows:"
2550 msgstr ""
2551
2552 #. type: Plain text
2553 #: build/C/man3/putgrent.3:33
2554 #, no-wrap
2555 msgid ""
2556 "struct group {\n"
2557 "    char   *gr_name;      /* group name */\n"
2558 "    char   *gr_passwd;    /* group password */\n"
2559 "    gid_t   gr_gid;       /* group ID */\n"
2560 "    char  **gr_mem;       /* group members */\n"
2561 "};\n"
2562 msgstr ""
2563
2564 #. type: Plain text
2565 #: build/C/man3/putgrent.3:37
2566 msgid "The function returns zero on success, and a nonzero value on error."
2567 msgstr ""
2568
2569 #. type: Plain text
2570 #: build/C/man3/putgrent.3:39
2571 msgid "This function is a GNU extension."
2572 msgstr ""
2573
2574 #. type: Plain text
2575 #: build/C/man3/putgrent.3:42
2576 msgid "B<fgetgrent>(3), B<getgrent>(3), B<group>(5)"
2577 msgstr ""
2578
2579 #. type: TH
2580 #: build/C/man3/putpwent.3:28
2581 #, no-wrap
2582 msgid "PUTPWENT"
2583 msgstr ""
2584
2585 #. type: Plain text
2586 #: build/C/man3/putpwent.3:31
2587 msgid "putpwent - write a password file entry"
2588 msgstr ""
2589
2590 #. type: Plain text
2591 #: build/C/man3/putpwent.3:38
2592 #, no-wrap
2593 msgid "B<int putpwent(const struct passwd *>I<p>B<, FILE *>I<stream>B<);>\n"
2594 msgstr ""
2595
2596 #. type: Plain text
2597 #: build/C/man3/putpwent.3:47
2598 msgid "B<putpwent>(): _SVID_SOURCE"
2599 msgstr ""
2600
2601 #. type: Plain text
2602 #: build/C/man3/putpwent.3:52
2603 msgid ""
2604 "The B<putpwent>()  function writes a password entry from the structure I<p> "
2605 "in the file associated with I<stream>."
2606 msgstr ""
2607
2608 #. type: Plain text
2609 #: build/C/man3/putpwent.3:66
2610 #, no-wrap
2611 msgid ""
2612 "struct passwd {\n"
2613 "    char    *pw_name;        /* username */\n"
2614 "    char    *pw_passwd;      /* user password */\n"
2615 "    uid_t    pw_uid;         /* user ID */\n"
2616 "    gid_t    pw_gid;         /* group ID */\n"
2617 "    char    *pw_gecos;       /* real name */\n"
2618 "    char    *pw_dir;         /* home directory */\n"
2619 "    char    *pw_shell;       /* shell program */\n"
2620 "};\n"
2621 msgstr ""
2622
2623 #. type: Plain text
2624 #: build/C/man3/putpwent.3:73
2625 msgid "The B<putpwent>()  function returns 0 on success, or -1 if an error occurs."
2626 msgstr ""
2627
2628 #. type: Plain text
2629 #: build/C/man3/putpwent.3:77
2630 msgid "Invalid (NULL) argument given."
2631 msgstr ""
2632
2633 #. type: Plain text
2634 #: build/C/man3/putpwent.3:86
2635 msgid ""
2636 "B<endpwent>(3), B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), "
2637 "B<getpwnam>(3), B<getpwuid>(3), B<setpwent>(3)"
2638 msgstr ""
2639
2640 #. type: TH
2641 #: build/C/man3/setaliasent.3:6
2642 #, no-wrap
2643 msgid "SETALIASENT"
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man3/setaliasent.3:10
2648 msgid ""
2649 "setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname, "
2650 "getaliasbyname_r - read an alias entry"
2651 msgstr ""
2652
2653 #. type: Plain text
2654 #: build/C/man3/setaliasent.3:12
2655 msgid "B<#include E<lt>aliases.hE<gt>>"
2656 msgstr ""
2657
2658 #. type: Plain text
2659 #: build/C/man3/setaliasent.3:14
2660 msgid "B<void setaliasent(void);>"
2661 msgstr ""
2662
2663 #. type: Plain text
2664 #: build/C/man3/setaliasent.3:16
2665 msgid "B<void endaliasent(void);>"
2666 msgstr ""
2667
2668 #. type: Plain text
2669 #: build/C/man3/setaliasent.3:18
2670 msgid "B<struct aliasent *getaliasent(void);>"
2671 msgstr ""
2672
2673 #. type: Plain text
2674 #: build/C/man3/setaliasent.3:20
2675 msgid "B<int getaliasent_r(struct aliasent *>I<result>B<,>"
2676 msgstr ""
2677
2678 #. type: Plain text
2679 #: build/C/man3/setaliasent.3:22 build/C/man3/setaliasent.3:28
2680 msgid "B< char *>I<buffer>B<, size_t >I<buflen>B<, struct aliasent **>I<res>B<);>"
2681 msgstr ""
2682
2683 #. type: Plain text
2684 #: build/C/man3/setaliasent.3:24
2685 msgid "B<struct aliasent *getaliasbyname(const char *>I<name>B<);>"
2686 msgstr ""
2687
2688 #. type: Plain text
2689 #: build/C/man3/setaliasent.3:26
2690 msgid ""
2691 "B<int getaliasbyname_r(const char *>I<name>B<, struct aliasent "
2692 "*>I<result>B<,>"
2693 msgstr ""
2694
2695 #. type: Plain text
2696 #: build/C/man3/setaliasent.3:33
2697 msgid ""
2698 "One of the databases available with the Name Service Switch (NSS)  is the "
2699 "aliases database, that contains mail aliases.  (To find out which databases "
2700 "are supported, try I<getent --help>.)  Six functions are provided to access "
2701 "the aliases database."
2702 msgstr ""
2703
2704 #. type: Plain text
2705 #: build/C/man3/setaliasent.3:40
2706 msgid ""
2707 "The B<getaliasent>()  function returns a pointer to a structure containing "
2708 "the group information from the aliases database.  The first time it is "
2709 "called it returns the first entry; thereafter, it returns successive "
2710 "entries."
2711 msgstr ""
2712
2713 #. type: Plain text
2714 #: build/C/man3/setaliasent.3:45
2715 msgid ""
2716 "The B<setaliasent>()  function rewinds the file pointer to the beginning of "
2717 "the aliases database."
2718 msgstr ""
2719
2720 #. type: Plain text
2721 #: build/C/man3/setaliasent.3:49
2722 msgid "The B<endaliasent>()  function closes the aliases database."
2723 msgstr ""
2724
2725 #. type: Plain text
2726 #: build/C/man3/setaliasent.3:56
2727 msgid ""
2728 "B<getaliasent_r>()  is the reentrant version of the previous function.  The "
2729 "requested structure is stored via the first argument but the programmer "
2730 "needs to fill the other arguments also.  Not providing enough space causes "
2731 "the function to fail."
2732 msgstr ""
2733
2734 #. type: Plain text
2735 #: build/C/man3/setaliasent.3:62
2736 msgid ""
2737 "The function B<getaliasbyname>()  takes the name argument and searches the "
2738 "aliases database.  The entry is returned as a pointer to a I<struct "
2739 "aliasent>."
2740 msgstr ""
2741
2742 #. type: Plain text
2743 #: build/C/man3/setaliasent.3:69
2744 msgid ""
2745 "B<getaliasbyname_r>()  is the reentrant version of the previous function.  "
2746 "The requested structure is stored via the second argument but the programmer "
2747 "needs to fill the other arguments also.  Not providing enough space causes "
2748 "the function to fail."
2749 msgstr ""
2750
2751 #. type: Plain text
2752 #: build/C/man3/setaliasent.3:74
2753 msgid "The I<struct aliasent> is defined in I<E<lt>aliases.hE<gt>>:"
2754 msgstr ""
2755
2756 #. type: Plain text
2757 #: build/C/man3/setaliasent.3:83
2758 #, no-wrap
2759 msgid ""
2760 "struct aliasent {\n"
2761 "    char    *alias_name;             /* alias name */\n"
2762 "    size_t   alias_members_len;\n"
2763 "    char   **alias_members;          /* alias name list */\n"
2764 "    int      alias_local;\n"
2765 "};\n"
2766 msgstr ""
2767
2768 #. type: Plain text
2769 #: build/C/man3/setaliasent.3:91
2770 msgid ""
2771 "The functions B<getaliasent_r>()  and B<getaliasbyname_r>()  return a "
2772 "nonzero value on error."
2773 msgstr ""
2774
2775 #. type: Plain text
2776 #: build/C/man3/setaliasent.3:97
2777 msgid ""
2778 "The default alias database is the file I</etc/aliases>.  This can be changed "
2779 "in the I</etc/nsswitch.conf> file."
2780 msgstr ""
2781
2782 #. type: Plain text
2783 #: build/C/man3/setaliasent.3:100
2784 msgid "These routines are glibc-specific.  The NeXT system has similar routines:"
2785 msgstr ""
2786
2787 #. type: Plain text
2788 #: build/C/man3/setaliasent.3:104
2789 #, no-wrap
2790 msgid "#include E<lt>aliasdb.hE<gt>\n"
2791 msgstr ""
2792
2793 #. type: Plain text
2794 #: build/C/man3/setaliasent.3:109
2795 #, no-wrap
2796 msgid ""
2797 "void alias_setent(void);\n"
2798 "void alias_endent(void);\n"
2799 "alias_ent *alias_getent(void);\n"
2800 "alias_ent *alias_getbyname(char *name);\n"
2801 msgstr ""
2802
2803 #. type: Plain text
2804 #: build/C/man3/setaliasent.3:115
2805 msgid ""
2806 "The following example compiles with I<gcc example.c -o example>.  It will "
2807 "dump all names in the alias database."
2808 msgstr ""
2809
2810 #. type: Plain text
2811 #: build/C/man3/setaliasent.3:121
2812 #, no-wrap
2813 msgid ""
2814 "#include E<lt>aliases.hE<gt>\n"
2815 "#include E<lt>stdio.hE<gt>\n"
2816 "#include E<lt>stdlib.hE<gt>\n"
2817 "#include E<lt>errno.hE<gt>\n"
2818 msgstr ""
2819
2820 #. type: Plain text
2821 #: build/C/man3/setaliasent.3:140
2822 #, no-wrap
2823 msgid ""
2824 "int\n"
2825 "main(void)\n"
2826 "{\n"
2827 "    struct aliasent *al;\n"
2828 "    setaliasent();\n"
2829 "    for (;;) {\n"
2830 "        al = getaliasent();\n"
2831 "        if (al == NULL)\n"
2832 "            break;\n"
2833 "        printf(\"Name: %s\\en\", al-E<gt>alias_name);\n"
2834 "    }\n"
2835 "    if (errno) {\n"
2836 "        perror(\"reading alias\");\n"
2837 "        exit(EXIT_FAILURE);\n"
2838 "    }\n"
2839 "    endaliasent();\n"
2840 "    exit(EXIT_SUCCESS);\n"
2841 "}\n"
2842 msgstr ""
2843
2844 #. type: Plain text
2845 #: build/C/man3/setaliasent.3:145
2846 msgid "B<getgrent>(3), B<getpwent>(3), B<getspent>(3), B<aliases>(5)"
2847 msgstr ""