3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6 .\" Manual: Polecenia Zarządzania Systemem
7 .\" Source: Polecenia Zarządzania Systemem
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 useradd \- create a new user or update default new user information
33 .HP \w'\fBuseradd\fR\ 'u
34 \fBuseradd\fR [\fIopcje\fR] \fILOGIN\fR
35 .HP \w'\fBuseradd\fR\ 'u
37 .HP \w'\fBuseradd\fR\ 'u
38 \fBuseradd\fR \-D [\fIopcje\fR]
41 When invoked without the
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
47 command will update system files and may also create the new user\*(Aqs home directory and copy initial files\&.
49 By default, a group will also be created for the new user (see
53 \fBUSERGROUPS_ENAB\fR)\&.
58 posiada następujące opcje:
60 \fB\-b\fR, \fB\-\-base\-dir\fR\fIKAT_BAZOWY\fR
62 The default base directory for the system if
67 is concatenated with the account name to define the home directory\&. If the
73 If this option is not specified,
75 will use the base directory specified by the
78 /etc/default/useradd, or
83 \fB\-c\fR, \fB\-\-comment\fR\fIKOMENTARZ\fR
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\&.
88 \fB\-d\fR, \fB\-\-home\fR\fIKAT_DOMOWY\fR
90 The new user will be created using
92 as the value for the user\*(Aqs login directory\&. The default is to append the
96 and use that as the login directory name\&. The directory
98 does not have to exist but will not be created if it is missing\&.
101 \fB\-D\fR, \fB\-\-defaults\fR
103 See below, the subsection "Changing the default values"\&.
106 \fB\-e\fR, \fB\-\-expiredate\fR\fIDATA_WAŻN\fR
108 Data, od kt\('orej konto danego użytkownika zostanie wy\(/lączone\&. Data podawana jest w formacie
113 will use the default expiry date specified by the
116 /etc/default/useradd, or an empty string (no expiry) by default\&.
119 \fB\-f\fR, \fB\-\-inactive\fR\fINIEAKTYWNE\fR
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\&.
125 will use the default inactivity period specified by the
128 /etc/default/useradd, or \-1 by default\&.
131 \fB\-g\fR, \fB\-\-gid\fR\fIGRUPA\fR
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\&.
135 If not specified, the bahavior of
138 \fBUSERGROUPS_ENAB\fR
140 /etc/login\&.defs\&. If this variable is set to
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
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
151 /etc/default/useradd, or 100 by default\&.
154 \fB\-G\fR, \fB\-\-groups\fR\fIGRUPA1\fR[\fI,GRUPA2,\&.\&.\&.\fR[\fI,GRUPAN\fR]]]
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
158 option\&. The default is for the user to belong only to the initial group\&.
161 \fB\-h\fR, \fB\-\-help\fR
163 Wyświetlenie komunikatu pomocy i zakończenie dzia\(/lania\&.
166 \fB\-k\fR, \fB\-\-skel\fR \fISKEL_DIR\fR
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
171 This option is only valid if the
174 \fB\-\-create\-home\fR) option is specified\&.
176 If this option is not set, the skeleton directory is defined by the
184 \fB\-K\fR, \fB\-\-key\fR\fIKLUCZ\fR=\fIWARTOŚĆ\fR
188 defaults (\fBUID_MIN\fR,
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
198 options can be specified, e\&.g\&.:
200 \fIUID_MIN\fR=\fI100\fR
202 \fIUID_MAX\fR=\fI499\fR
206 \fIUID_MIN\fR=\fI10\fR,\fIUID_MAX\fR=\fI499\fR
207 doesn\*(Aqt work yet\&.
210 \fB\-l\fR, \fB\-\-no\-log\-init\fR
212 Do not add the user to the lastlog and faillog databases\&.
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\&.
217 \fB\-m\fR, \fB\-\-create\-home\fR
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
221 option) will be copied to the home directory\&.
223 By default, no home directories are created\&.
228 Do no create the user\*(Aqs home directory, even if the system wide setting from
230 (\fBCREATE_HOME\fR) is set to
234 \fB\-N\fR, \fB\-\-no\-user\-group\fR
236 Do not create a group with the same name as the user, but add the user to the group specified by the
241 /etc/default/useradd\&.
243 The default behavior (if the
247 options are not specified) is defined by the
248 \fBUSERGROUPS_ENAB\fR
253 \fB\-o\fR, \fB\-\-non\-unique\fR
255 Allow the creation of a user account with a duplicate (non\-unique) UID\&.
257 This option is only valid in combination with the
262 \fB\-p\fR, \fB\-\-password\fR\fIHAS\(/LO\fR
264 The encrypted password, as returned by
265 \fBcrypt\fR(3)\&. The default is to disable the password\&.
269 This option is not recommended because the password (or encrypted password) will be visible by users listing the processes\&.
271 You should make sure the password respects the system\*(Aqs password policy\&.
274 \fB\-r\fR, \fB\-\-system\fR
276 Create a system account\&.
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
282 /etc/login\&.defs, instead of
283 \fBUID_MIN\fR\-\fBUID_MAX\fR
286 counterparts for the creation of groups)\&.
290 will not create a home directory for such an user, regardless of the default setting in
292 (\fBCREATE_HOME\fR)\&. You have to specify the
294 options if you want a home directory for a system account to be created\&.
297 \fB\-s\fR, \fB\-\-shell\fR\fISHELL\fR
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
302 /etc/default/useradd, or an empty string by default\&.
305 \fB\-u\fR, \fB\-\-uid\fR\fIUID\fR
307 The numerical value of the user\*(Aqs ID\&. This value must be unique, unless the
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\&.
312 \fB\-U\fR, \fB\-\-user\-group\fR
314 Create a group with the same name as the user, and add the user to this group\&.
316 The default behavior (if the
320 options are not specified) is defined by the
321 \fBUSERGROUPS_ENAB\fR
326 \fB\-Z\fR, \fB\-\-selinux\-user\fR \fISEUSER\fR
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\&.
330 .SS "Changing the default values"
332 When invoked with only the
336 will display the current default values\&. When invoked with
340 will update the default values for the specified options\&. Valid default\-changing options are:
342 \fB\-b\fR, \fB\-\-base\-dir\fR\fIKAT_BAZOWY\fR
344 The path prefix for a new user\*(Aqs home directory\&. The user\*(Aqs name will be affixed to the end of
346 to form the new user\*(Aqs home directory name, if the
348 option is not used when creating a new account\&.
353 /etc/default/useradd\&.
356 \fB\-e\fR, \fB\-\-expiredate\fR\fIDATA_WAŻN\fR
358 The date on which the user account is disabled\&.
363 /etc/default/useradd\&.
366 \fB\-f\fR, \fB\-\-inactive\fR\fINIEAKTYWNE\fR
368 The number of days after a password has expired before the account will be disabled\&.
373 /etc/default/useradd\&.
376 \fB\-g\fR, \fB\-\-gid\fR\fIGRUPA\fR
378 The group name or ID for a new user\*(Aqs initial group (when the
379 \fB\-N/\-\-no\-user\-group\fR
381 \fBUSERGROUPS_ENAB\fR
385 /etc/login\&.defs\&. The named group must exist, and a numerical group ID must have an existing entry\&.
390 /etc/default/useradd\&.
393 \fB\-s\fR, \fB\-\-shell\fR\fISHELL\fR
395 The name of a new user\*(Aqs login shell\&.
400 /etc/default/useradd\&.
404 The system administrator is responsible for placing the default user files in the
406 directory (or any other skeleton directory specified in
408 or on the command line)\&.
411 You may not add a user to a NIS or LDAP group\&. This must be performed on the corresponding server\&.
413 Similarly, if the username already exists in an external user database such as NIS or LDAP,
415 will deny the user account creation request\&.
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_\-]*[$]?
419 Usernames may only be up to 32 characters long\&.
422 The following configuration variables in
424 change the behavior of this tool:
426 \fBCREATE_HOME\fR (boolean)
428 Indicate if a home directory should be created by default for new users\&.
430 This setting does not apply to system users, and can be overriden on the command line\&.
433 \fBGID_MAX\fR (number), \fBGID_MIN\fR (number)
435 Range of group IDs used for the creation of regular groups by
441 \fBMAIL_DIR\fR (string)
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\&.
446 \fBMAIL_FILE\fR (string)
448 Defines the location of the users mail spool files relatively to their home directory\&.
455 variables are used by
459 to create, move, or delete the user\*(Aqs mail spool\&.
462 \fBMAIL_CHECK_ENAB\fR
464 \fIyes\fR, they are also used to define the
466 environment variable\&.
468 \fBMAX_MEMBERS_PER_GROUP\fR (number)
470 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
472 (with the same name, same password, and same GID)\&.
474 The default value is 0, meaning that there are no limits in the number of members in a group\&.
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\&.
478 If you need to enforce such limit, you can use 25\&.
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\&.
483 \fBPASS_MAX_DAYS\fR (number)
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)\&.
488 \fBPASS_MIN_DAYS\fR (number)
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)\&.
493 \fBPASS_WARN_AGE\fR (number)
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\&.
498 \fBSYS_GID_MAX\fR (number), \fBSYS_GID_MIN\fR (number)
500 Range of group IDs used for the creation of system groups by
506 \fBSYS_UID_MAX\fR (number), \fBSYS_UID_MIN\fR (number)
508 Range of user IDs used for the creation of system users by
514 \fBUID_MAX\fR (number), \fBUID_MIN\fR (number)
516 Range of user IDs used for the creation of regular users by
524 The file mode creation mask is initialized to this value\&. If not specified, the mask will be initialized to 022\&.
530 use this mask to set the mode of the home directory they create
534 to define users\*(Aq initial umask\&. Note that this mask can be overriden by the user\*(Aqs GECOS line (if
536 is set) or by the specification of a limit with the
542 \fBUSERGROUPS_ENAB\fR (boolean)
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\&.
549 will remove the user\*(Aqs group if it contains no more members, and
551 will create by default a group with the name of the user\&.
557 Informacja o kontach użytkownik\('ow\&.
562 Informacje chronione o użytkownikach\&.
567 Informacje o grupach użytkownik\('ow\&.
572 Informacje chronione o grupach użytkownik\('ow\&.
577 Default values for account creation\&.
582 Directory containing default files\&.
587 Konfiguracja pakietu shadow\&.
589 .SH "KOD ZAKOŃCZENIA"
593 kończy dzia\(/lanie z następującymi wartościami kod\('ow zakończenia:
597 poprawne zakończenie dzia\(/lania programu
602 nie można zaktualizować pliku z has\(/lami
607 niepoprawna sk\(/ladnia polecenia
612 nieprawid\(/lowy argument opcji
617 UID juz jest używany (i nie uzyto opcji
623 specified group doesn\*(Aqt exist
628 username already in use
633 nie można zaktualizować pliku z grupami
638 can\*(Aqt create home directory
643 can\*(Aqt create mail spool