Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / pl / useradd.8
1 '\" t
2 .\"     Title: useradd
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 02/16/2011
6 .\"    Manual: Polecenia Zarządzania Systemem
7 .\"    Source: Polecenia Zarządzania Systemem
8 .\"  Language: Polish
9 .\"
10 .TH "USERADD" "8" "02/16/2011" "Polecenia Zarządzania Systemem" "Polecenia Zarządzania Systemem"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAZWA"
31 useradd \- create a new user or update default new user information
32 .SH "SK\(/LADNIA"
33 .HP \w'\fBuseradd\fR\ 'u
34 \fBuseradd\fR [\fIopcje\fR] \fILOGIN\fR
35 .HP \w'\fBuseradd\fR\ 'u
36 \fBuseradd\fR \-D
37 .HP \w'\fBuseradd\fR\ 'u
38 \fBuseradd\fR \-D [\fIopcje\fR]
39 .SH "OPIS"
40 .PP
41 When invoked without the
42 \fB\-D\fR
43 option, the
44 \fBuseradd\fR
45 command creates a new user account using the values specified on the command line plus the default values from the system\&. Depending on command line options, the
46 \fBuseradd\fR
47 command will update system files and may also create the new user\*(Aqs home directory and copy initial files\&.
48 .PP
49 By default, a group will also be created for the new user (see
50 \fB\-g\fR,
51 \fB\-N\fR,
52 \fB\-U\fR, and
53 \fBUSERGROUPS_ENAB\fR)\&.
54 .SH "OPCJE"
55 .PP
56 Polecenie
57 \fBuseradd\fR
58 posiada następujące opcje:
59 .PP
60 \fB\-b\fR, \fB\-\-base\-dir\fR\fIKAT_BAZOWY\fR
61 .RS 4
62 The default base directory for the system if
63 \fB\-d\fR
64 \fIHOME_DIR\fR
65 is not specified\&.
66 \fIBASE_DIR\fR
67 is concatenated with the account name to define the home directory\&. If the
68 \fB\-m\fR
69 option is not used,
70 \fIBASE_DIR\fR
71 must exist\&.
72 .sp
73 If this option is not specified,
74 \fBuseradd\fR
75 will use the base directory specified by the
76 \fBHOME\fR
77 variable in
78 /etc/default/useradd, or
79 /home
80 by default\&.
81 .RE
82 .PP
83 \fB\-c\fR, \fB\-\-comment\fR\fIKOMENTARZ\fR
84 .RS 4
85 Any text string\&. It is generally a short description of the login, and is currently used as the field for the user\*(Aqs full name\&.
86 .RE
87 .PP
88 \fB\-d\fR, \fB\-\-home\fR\fIKAT_DOMOWY\fR
89 .RS 4
90 The new user will be created using
91 \fIHOME_DIR\fR
92 as the value for the user\*(Aqs login directory\&. The default is to append the
93 \fILOGIN\fR
94 name to
95 \fIBASE_DIR\fR
96 and use that as the login directory name\&. The directory
97 \fIHOME_DIR\fR
98 does not have to exist but will not be created if it is missing\&.
99 .RE
100 .PP
101 \fB\-D\fR, \fB\-\-defaults\fR
102 .RS 4
103 See below, the subsection "Changing the default values"\&.
104 .RE
105 .PP
106 \fB\-e\fR, \fB\-\-expiredate\fR\fIDATA_WAŻN\fR
107 .RS 4
108 Data, od kt\('orej konto danego użytkownika zostanie wy\(/lączone\&. Data podawana jest w formacie
109 \fIMM/DD/RR\fR\&.
110 .sp
111 If not specified,
112 \fBuseradd\fR
113 will use the default expiry date specified by the
114 \fBEXPIRE\fR
115 variable in
116 /etc/default/useradd, or an empty string (no expiry) by default\&.
117 .RE
118 .PP
119 \fB\-f\fR, \fB\-\-inactive\fR\fINIEAKTYWNE\fR
120 .RS 4
121 The number of days after a password expires until the account is permanently disabled\&. A value of 0 disables the account as soon as the password has expired, and a value of \-1 disables the feature\&.
122 .sp
123 If not specified,
124 \fBuseradd\fR
125 will use the default inactivity period specified by the
126 \fBINACTIVE\fR
127 variable in
128 /etc/default/useradd, or \-1 by default\&.
129 .RE
130 .PP
131 \fB\-g\fR, \fB\-\-gid\fR\fIGRUPA\fR
132 .RS 4
133 The group name or number of the user\*(Aqs initial login group\&. The group name must exist\&. A group number must refer to an already existing group\&.
134 .sp
135 If not specified, the bahavior of
136 \fBuseradd\fR
137 will depend on the
138 \fBUSERGROUPS_ENAB\fR
139 variable in
140 /etc/login\&.defs\&. If this variable is set to
141 \fIyes\fR
142 (or
143 \fB\-U/\-\-user\-group\fR
144 is specified on the command line), a group will be created for the user, with the same name as her loginname\&. If the variable is set to
145 \fIno\fR
146 (or
147 \fB\-N/\-\-no\-user\-group\fR
148 is specified on the command line), useradd will set the primary group of the new user to the value specified by the
149 \fBGROUP\fR
150 variable in
151 /etc/default/useradd, or 100 by default\&.
152 .RE
153 .PP
154 \fB\-G\fR, \fB\-\-groups\fR\fIGRUPA1\fR[\fI,GRUPA2,\&.\&.\&.\fR[\fI,GRUPAN\fR]]]
155 .RS 4
156 A list of supplementary groups which the user is also a member of\&. Each group is separated from the next by a comma, with no intervening whitespace\&. The groups are subject to the same restrictions as the group given with the
157 \fB\-g\fR
158 option\&. The default is for the user to belong only to the initial group\&.
159 .RE
160 .PP
161 \fB\-h\fR, \fB\-\-help\fR
162 .RS 4
163 Wyświetlenie komunikatu pomocy i zakończenie dzia\(/lania\&.
164 .RE
165 .PP
166 \fB\-k\fR, \fB\-\-skel\fR \fISKEL_DIR\fR
167 .RS 4
168 The skeleton directory, which contains files and directories to be copied in the user\*(Aqs home directory, when the home directory is created by
169 \fBuseradd\fR\&.
170 .sp
171 This option is only valid if the
172 \fB\-m\fR
173 (or
174 \fB\-\-create\-home\fR) option is specified\&.
175 .sp
176 If this option is not set, the skeleton directory is defined by the
177 \fBSKEL\fR
178 variable in
179 /etc/default/useradd
180 or, by default,
181 /etc/skel\&.
182 .RE
183 .PP
184 \fB\-K\fR, \fB\-\-key\fR\fIKLUCZ\fR=\fIWARTOŚĆ\fR
185 .RS 4
186 Overrides
187 /etc/login\&.defs
188 defaults (\fBUID_MIN\fR,
189 \fBUID_MAX\fR,
190 \fBUMASK\fR,
191 \fBPASS_MAX_DAYS\fR
192 and others)\&.
193
194 Example:
195 \fB\-K \fR\fIPASS_MAX_DAYS\fR=\fI\-1\fR
196 can be used when creating system account to turn off password ageing, even though system account has no password at all\&. Multiple
197 \fB\-K\fR
198 options can be specified, e\&.g\&.:
199 \fB\-K \fR
200 \fIUID_MIN\fR=\fI100\fR
201 \fB\-K \fR
202 \fIUID_MAX\fR=\fI499\fR
203 .sp
204 Note:
205 \fB\-K \fR
206 \fIUID_MIN\fR=\fI10\fR,\fIUID_MAX\fR=\fI499\fR
207 doesn\*(Aqt work yet\&.
208 .RE
209 .PP
210 \fB\-l\fR, \fB\-\-no\-log\-init\fR
211 .RS 4
212 Do not add the user to the lastlog and faillog databases\&.
213 .sp
214 By default, the user\*(Aqs entries in the lastlog and faillog databases are resetted to avoid reusing the entry from a previously deleted user\&.
215 .RE
216 .PP
217 \fB\-m\fR, \fB\-\-create\-home\fR
218 .RS 4
219 Create the user\*(Aqs home directory if it does not exist\&. The files and directories contained in the skeleton directory (which can be defined with the
220 \fB\-k\fR
221 option) will be copied to the home directory\&.
222 .sp
223 By default, no home directories are created\&.
224 .RE
225 .PP
226 \fB\-M\fR
227 .RS 4
228 Do no create the user\*(Aqs home directory, even if the system wide setting from
229 /etc/login\&.defs
230 (\fBCREATE_HOME\fR) is set to
231 \fIyes\fR\&.
232 .RE
233 .PP
234 \fB\-N\fR, \fB\-\-no\-user\-group\fR
235 .RS 4
236 Do not create a group with the same name as the user, but add the user to the group specified by the
237 \fB\-g\fR
238 option or by the
239 \fBGROUP\fR
240 variable in
241 /etc/default/useradd\&.
242 .sp
243 The default behavior (if the
244 \fB\-g\fR,
245 \fB\-N\fR, and
246 \fB\-U\fR
247 options are not specified) is defined by the
248 \fBUSERGROUPS_ENAB\fR
249 variable in
250 /etc/login\&.defs\&.
251 .RE
252 .PP
253 \fB\-o\fR, \fB\-\-non\-unique\fR
254 .RS 4
255 Allow the creation of a user account with a duplicate (non\-unique) UID\&.
256 .sp
257 This option is only valid in combination with the
258 \fB\-o\fR
259 option\&.
260 .RE
261 .PP
262 \fB\-p\fR, \fB\-\-password\fR\fIHAS\(/LO\fR
263 .RS 4
264 The encrypted password, as returned by
265 \fBcrypt\fR(3)\&. The default is to disable the password\&.
266 .sp
267
268 \fBNote:\fR
269 This option is not recommended because the password (or encrypted password) will be visible by users listing the processes\&.
270 .sp
271 You should make sure the password respects the system\*(Aqs password policy\&.
272 .RE
273 .PP
274 \fB\-r\fR, \fB\-\-system\fR
275 .RS 4
276 Create a system account\&.
277 .sp
278 System users will be created with no aging information in
279 /etc/shadow, and their numeric identifiers are choosen in the
280 \fBSYS_UID_MIN\fR\-\fBSYS_UID_MAX\fR
281 range, defined in
282 /etc/login\&.defs, instead of
283 \fBUID_MIN\fR\-\fBUID_MAX\fR
284 (and their
285 \fBGID\fR
286 counterparts for the creation of groups)\&.
287 .sp
288 Note that
289 \fBuseradd\fR
290 will not create a home directory for such an user, regardless of the default setting in
291 /etc/login\&.defs
292 (\fBCREATE_HOME\fR)\&. You have to specify the
293 \fB\-m\fR
294 options if you want a home directory for a system account to be created\&.
295 .RE
296 .PP
297 \fB\-s\fR, \fB\-\-shell\fR\fISHELL\fR
298 .RS 4
299 The name of the user\*(Aqs login shell\&. The default is to leave this field blank, which causes the system to select the default login shell specified by the
300 \fBSHELL\fR
301 variable in
302 /etc/default/useradd, or an empty string by default\&.
303 .RE
304 .PP
305 \fB\-u\fR, \fB\-\-uid\fR\fIUID\fR
306 .RS 4
307 The numerical value of the user\*(Aqs ID\&. This value must be unique, unless the
308 \fB\-o\fR
309 option is used\&. The value must be non\-negative\&. The default is to use the smallest ID value greater than 999 and greater than every other user\&. Values between 0 and 999 are typically reserved for system accounts\&.
310 .RE
311 .PP
312 \fB\-U\fR, \fB\-\-user\-group\fR
313 .RS 4
314 Create a group with the same name as the user, and add the user to this group\&.
315 .sp
316 The default behavior (if the
317 \fB\-g\fR,
318 \fB\-N\fR, and
319 \fB\-U\fR
320 options are not specified) is defined by the
321 \fBUSERGROUPS_ENAB\fR
322 variable in
323 /etc/login\&.defs\&.
324 .RE
325 .PP
326 \fB\-Z\fR, \fB\-\-selinux\-user\fR \fISEUSER\fR
327 .RS 4
328 The SELinux user for the user\*(Aqs login\&. The default is to leave this field blank, which causes the system to select the default SELinux user\&.
329 .RE
330 .SS "Changing the default values"
331 .PP
332 When invoked with only the
333 \fB\-D\fR
334 option,
335 \fBuseradd\fR
336 will display the current default values\&. When invoked with
337 \fB\-D\fR
338 plus other options,
339 \fBuseradd\fR
340 will update the default values for the specified options\&. Valid default\-changing options are:
341 .PP
342 \fB\-b\fR, \fB\-\-base\-dir\fR\fIKAT_BAZOWY\fR
343 .RS 4
344 The path prefix for a new user\*(Aqs home directory\&. The user\*(Aqs name will be affixed to the end of
345 \fIBASE_DIR\fR
346 to form the new user\*(Aqs home directory name, if the
347 \fB\-d\fR
348 option is not used when creating a new account\&.
349 .sp
350 This option sets the
351 \fBHOME\fR
352 variable in
353 /etc/default/useradd\&.
354 .RE
355 .PP
356 \fB\-e\fR, \fB\-\-expiredate\fR\fIDATA_WAŻN\fR
357 .RS 4
358 The date on which the user account is disabled\&.
359 .sp
360 This option sets the
361 \fBEXPIRE\fR
362 variable in
363 /etc/default/useradd\&.
364 .RE
365 .PP
366 \fB\-f\fR, \fB\-\-inactive\fR\fINIEAKTYWNE\fR
367 .RS 4
368 The number of days after a password has expired before the account will be disabled\&.
369 .sp
370 This option sets the
371 \fBINACTIVE\fR
372 variable in
373 /etc/default/useradd\&.
374 .RE
375 .PP
376 \fB\-g\fR, \fB\-\-gid\fR\fIGRUPA\fR
377 .RS 4
378 The group name or ID for a new user\*(Aqs initial group (when the
379 \fB\-N/\-\-no\-user\-group\fR
380 is used or when the
381 \fBUSERGROUPS_ENAB\fR
382 variable is set to
383 \fIno\fR
384 in
385 /etc/login\&.defs\&. The named group must exist, and a numerical group ID must have an existing entry\&.
386 .sp
387 This option sets the
388 \fBGROUP\fR
389 variable in
390 /etc/default/useradd\&.
391 .RE
392 .PP
393 \fB\-s\fR, \fB\-\-shell\fR\fISHELL\fR
394 .RS 4
395 The name of a new user\*(Aqs login shell\&.
396 .sp
397 This option sets the
398 \fBSHELL\fR
399 variable in
400 /etc/default/useradd\&.
401 .RE
402 .SH "UWAGI"
403 .PP
404 The system administrator is responsible for placing the default user files in the
405 /etc/skel/
406 directory (or any other skeleton directory specified in
407 /etc/default/useradd
408 or on the command line)\&.
409 .SH "OSTRZEŻENIA"
410 .PP
411 You may not add a user to a NIS or LDAP group\&. This must be performed on the corresponding server\&.
412 .PP
413 Similarly, if the username already exists in an external user database such as NIS or LDAP,
414 \fBuseradd\fR
415 will deny the user account creation request\&.
416 .PP
417 Usernames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
418 .PP
419 Usernames may only be up to 32 characters long\&.
420 .SH "CONFIGURATION"
421 .PP
422 The following configuration variables in
423 /etc/login\&.defs
424 change the behavior of this tool:
425 .PP
426 \fBCREATE_HOME\fR (boolean)
427 .RS 4
428 Indicate if a home directory should be created by default for new users\&.
429 .sp
430 This setting does not apply to system users, and can be overriden on the command line\&.
431 .RE
432 .PP
433 \fBGID_MAX\fR (number), \fBGID_MIN\fR (number)
434 .RS 4
435 Range of group IDs used for the creation of regular groups by
436 \fBuseradd\fR,
437 \fBgroupadd\fR, or
438 \fBnewusers\fR\&.
439 .RE
440 .PP
441 \fBMAIL_DIR\fR (string)
442 .RS 4
443 The mail spool directory\&. This is needed to manipulate the mailbox when its corresponding user account is modified or deleted\&. If not specified, a compile\-time default is used\&.
444 .RE
445 .PP
446 \fBMAIL_FILE\fR (string)
447 .RS 4
448 Defines the location of the users mail spool files relatively to their home directory\&.
449 .RE
450 .PP
451 The
452 \fBMAIL_DIR\fR
453 and
454 \fBMAIL_FILE\fR
455 variables are used by
456 \fBuseradd\fR,
457 \fBusermod\fR, and
458 \fBuserdel\fR
459 to create, move, or delete the user\*(Aqs mail spool\&.
460 .PP
461 If
462 \fBMAIL_CHECK_ENAB\fR
463 is set to
464 \fIyes\fR, they are also used to define the
465 \fBMAIL\fR
466 environment variable\&.
467 .PP
468 \fBMAX_MEMBERS_PER_GROUP\fR (number)
469 .RS 4
470 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
471 /etc/group
472 (with the same name, same password, and same GID)\&.
473 .sp
474 The default value is 0, meaning that there are no limits in the number of members in a group\&.
475 .sp
476 This feature (split group) permits to limit the length of lines in the group file\&. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\&.
477 .sp
478 If you need to enforce such limit, you can use 25\&.
479 .sp
480 Note: split groups may not be supported by all tools (even in the Shadow toolsuite)\&. You should not use this variable unless you really need it\&.
481 .RE
482 .PP
483 \fBPASS_MAX_DAYS\fR (number)
484 .RS 4
485 The maximum number of days a password may be used\&. If the password is older than this, a password change will be forced\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
486 .RE
487 .PP
488 \fBPASS_MIN_DAYS\fR (number)
489 .RS 4
490 The minimum number of days allowed between password changes\&. Any password changes attempted sooner than this will be rejected\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
491 .RE
492 .PP
493 \fBPASS_WARN_AGE\fR (number)
494 .RS 4
495 The number of days warning given before a password expires\&. A zero means warning is given only upon the day of expiration, a negative value means no warning is given\&. If not specified, no warning will be provided\&.
496 .RE
497 .PP
498 \fBSYS_GID_MAX\fR (number), \fBSYS_GID_MIN\fR (number)
499 .RS 4
500 Range of group IDs used for the creation of system groups by
501 \fBuseradd\fR,
502 \fBgroupadd\fR, or
503 \fBnewusers\fR\&.
504 .RE
505 .PP
506 \fBSYS_UID_MAX\fR (number), \fBSYS_UID_MIN\fR (number)
507 .RS 4
508 Range of user IDs used for the creation of system users by
509 \fBuseradd\fR
510 or
511 \fBnewusers\fR\&.
512 .RE
513 .PP
514 \fBUID_MAX\fR (number), \fBUID_MIN\fR (number)
515 .RS 4
516 Range of user IDs used for the creation of regular users by
517 \fBuseradd\fR
518 or
519 \fBnewusers\fR\&.
520 .RE
521 .PP
522 \fBUMASK\fR (number)
523 .RS 4
524 The file mode creation mask is initialized to this value\&. If not specified, the mask will be initialized to 022\&.
525 .sp
526
527 \fBuseradd\fR
528 and
529 \fBnewusers\fR
530 use this mask to set the mode of the home directory they create
531 .sp
532 It is also used by
533 \fBlogin\fR
534 to define users\*(Aq initial umask\&. Note that this mask can be overriden by the user\*(Aqs GECOS line (if
535 \fBQUOTAS_ENAB\fR
536 is set) or by the specification of a limit with the
537 \fIK\fR
538 identifier in
539 \fBlimits\fR(5)\&.
540 .RE
541 .PP
542 \fBUSERGROUPS_ENAB\fR (boolean)
543 .RS 4
544 Enable setting of the umask group bits to be the same as owner bits (examples: 022 \-> 002, 077 \-> 007) for non\-root users, if the uid is the same as gid, and username is the same as the primary group name\&.
545 .sp
546 If set to
547 \fIyes\fR,
548 \fBuserdel\fR
549 will remove the user\*(Aqs group if it contains no more members, and
550 \fBuseradd\fR
551 will create by default a group with the name of the user\&.
552 .RE
553 .SH "PLIKI"
554 .PP
555 /etc/passwd
556 .RS 4
557 Informacja o kontach użytkownik\('ow\&.
558 .RE
559 .PP
560 /etc/shadow
561 .RS 4
562 Informacje chronione o użytkownikach\&.
563 .RE
564 .PP
565 /etc/group
566 .RS 4
567 Informacje o grupach użytkownik\('ow\&.
568 .RE
569 .PP
570 /etc/gshadow
571 .RS 4
572 Informacje chronione o grupach użytkownik\('ow\&.
573 .RE
574 .PP
575 /etc/default/useradd
576 .RS 4
577 Default values for account creation\&.
578 .RE
579 .PP
580 /etc/skel/
581 .RS 4
582 Directory containing default files\&.
583 .RE
584 .PP
585 /etc/login\&.defs
586 .RS 4
587 Konfiguracja pakietu shadow\&.
588 .RE
589 .SH "KOD ZAKOŃCZENIA"
590 .PP
591 Polecenie
592 \fBuseradd\fR
593 kończy dzia\(/lanie z następującymi wartościami kod\('ow zakończenia:
594 .PP
595 \fI0\fR
596 .RS 4
597 poprawne zakończenie dzia\(/lania programu
598 .RE
599 .PP
600 \fI1\fR
601 .RS 4
602 nie można zaktualizować pliku z has\(/lami
603 .RE
604 .PP
605 \fI2\fR
606 .RS 4
607 niepoprawna sk\(/ladnia polecenia
608 .RE
609 .PP
610 \fI3\fR
611 .RS 4
612 nieprawid\(/lowy argument opcji
613 .RE
614 .PP
615 \fI4\fR
616 .RS 4
617 UID juz jest używany (i nie uzyto opcji
618 \fB\-o\fR)
619 .RE
620 .PP
621 \fI6\fR
622 .RS 4
623 specified group doesn\*(Aqt exist
624 .RE
625 .PP
626 \fI9\fR
627 .RS 4
628 username already in use
629 .RE
630 .PP
631 \fI10\fR
632 .RS 4
633 nie można zaktualizować pliku z grupami
634 .RE
635 .PP
636 \fI12\fR
637 .RS 4
638 can\*(Aqt create home directory
639 .RE
640 .PP
641 \fI13\fR
642 .RS 4
643 can\*(Aqt create mail spool
644 .RE
645 .SH "ZOBACZ TAKŻE"
646 .PP
647 \fBchfn\fR(1),
648 \fBchsh\fR(1),
649 \fBpasswd\fR(1),
650 \fBcrypt\fR(3),
651 \fBgroupadd\fR(8),
652 \fBgroupdel\fR(8),
653 \fBgroupmod\fR(8),
654 \fBlogin.defs\fR(5),
655 \fBnewusers\fR(8),
656 \fBuserdel\fR(8),
657 \fBusermod\fR(8)\&.