3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
5
5
.\" Manual: System Management Commands
6
6
.\" Source: System Management Commands
8
.TH "USERMOD" "8" "04/03/2008" "System Management Commands" "System Management Commands"
8
.TH "USERMOD" "8" "04/15/2009" "System Management Commands" "System Management Commands"
9
9
.\" disable hyphenation
11
11
.\" disable justification (adjust text to left margin only)
29
29
\fB\-a\fR, \fB\-\-append\fR
31
Add the user to the supplemental group(s)\. Use only with
31
Add the user to the supplemental group(s)\&. Use only with
36
36
\fB\-c\fR, \fB\-\-comment\fR \fICOMMENT\fR
38
The new value of the user\'s password file comment field\. It is normally modified using the
38
The new value of the user\'s password file comment field\&. It is normally modified using the
43
43
\fB\-d\fR, \fB\-\-home\fR \fIHOME_DIR\fR
45
The user\'s new login directory\. If the
45
The user\'s new login directory\&.
47
option is given the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist\.
49
option is given the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist\&.
50
52
\fB\-e\fR, \fB\-\-expiredate\fR \fIEXPIRE_DATE\fR
52
The date on which the user account will be disabled\. The date is specified in the format
54
The date on which the user account will be disabled\&. The date is specified in the format
56
58
\fB\-f\fR, \fB\-\-inactive\fR \fIINACTIVE\fR
58
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\. The default value is \-1\.
60
The number of days after a password expires until the account is permanently disabled\&.
62
A value of 0 disables the account as soon as the password has expired, and a value of \-1 disables the feature\&.
61
65
\fB\-g\fR, \fB\-\-gid\fR \fIGROUP\fR
63
The group name or number of the user\'s new initial login group\. The group name must exist\. A group number must refer to an already existing group\. The default group number is 1\.
67
The group name or number of the user\'s new initial login group\&. The group must exist\&.
66
\fB\-G\fR, \fB\-\-groups\fR \fIGROUP1\fR[\fI,GROUP2,\.\.\.\fR[\fI,GROUPN\fR]]]
70
\fB\-G\fR, \fB\-\-groups\fR \fIGROUP1\fR[\fI,GROUP2,\&.\&.\&.\fR[\fI,GROUPN\fR]]]
68
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
72
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
70
option\. If the user is currently a member of a group which is not listed, the user will be removed from the group\. This behaviour can be changed via the
76
If the user is currently a member of a group which is not listed, the user will be removed from the group\&. This behaviour can be changed via the
72
option, which appends the user to the current supplementary group list\.
78
option, which appends the user to the current supplementary group list\&.
75
81
\fB\-l\fR, \fB\-\-login\fR \fINEW_LOGIN\fR
77
83
The name of the user will be changed from
80
\fINEW_LOGIN\fR\. Nothing else is changed\. In particular, the user\'s home directory name should probably be changed manually to reflect the new login name\.
86
\fINEW_LOGIN\fR\&. Nothing else is changed\&. In particular, the user\'s home directory name should probably be changed manually to reflect the new login name\&.
83
89
\fB\-L\fR, \fB\-\-lock\fR
85
Lock a user\'s password\. This puts a \'!\' in front of the encrypted password, effectively disabling the password\. You can\'t use this option with
91
Lock a user\'s password\&. This puts a \'!\' in front of the encrypted password, effectively disabling the password\&. You can\'t use this option with
90
96
Note: if you wish to lock the account (not only access with a password), you should also set the
96
102
\fB\-o\fR, \fB\-\-non\-unique\fR
98
104
When used with the
100
option, this option allows to change the user ID to a non\-unique value\.
106
option, this option allows to change the user ID to a non\-unique value\&.
103
109
\fB\-p\fR, \fB\-\-password\fR \fIPASSWORD\fR
105
111
The encrypted password, as returned by
109
115
\fB\-s\fR, \fB\-\-shell\fR \fISHELL\fR
111
The name of the user\'s new login shell\. Setting this field to blank causes the system to select the default login shell\.
117
The name of the user\'s new login shell\&. Setting this field to blank causes the system to select the default login shell\&.
114
120
\fB\-u\fR, \fB\-\-uid\fR \fIUID\fR
116
The numerical value of the user\'s ID\. This value must be unique, unless the
122
The new numerical value of the user\'s ID\&.
124
This value must be unique, unless the
118
option is used\. The value must be non\-negative\. Values between 0 and 999 are typically reserved for system accounts\. Any files which the user owns and which are located in the directory tree rooted at the user\'s home directory will have the file user ID changed automatically\. Files outside of the user\'s home directory must be altered manually\.
126
option is used\&. The value must be non\-negative\&. Values between 0 and 999 are typically reserved for system accounts\&.
128
Any files which the user owns and which are located in the directory tree rooted at the user\'s home directory will have the file user ID changed automatically\&. Files outside of the user\'s home directory must be altered manually\&.
121
131
\fB\-U\fR, \fB\-\-unlock\fR
123
Unlock a user\'s password\. This removes the \'!\' in front of the encrypted password\. You can\'t use this option with
133
Unlock a user\'s password\&. This removes the \'!\' in front of the encrypted password\&. You can\'t use this option with
128
138
Note: if you wish to unlock the account (not only access with a password), you should also set the
129
139
\fIEXPIRE_DATE\fR
131
141
\fI99999\fR, or to the
134
\fI/etc/default/useradd\fR)\.
144
\fI/etc/default/useradd\fR)\&.
147
\fB\-Z\fR, \fB\-\-selinux\-user\fR \fISEUSER\fR
149
The SELinux user for the user\'s login\&. The default is to leave this field the blank, which causes the system to select the default SELinux user\&.
140
will not allow you to change the name of a user who is logged in\. You must make certain that the named user is not executing any processes when this command is being executed if the user\'s numerical user ID is being changed\. You must change the owner of any
155
will not allow you to change the name of an user who is logged in\&. You must make certain that the named user is not executing any processes when this command is being executed if the user\'s numerical user ID is being changed\&. You must change the owner of any
142
files manually\. You must change the owner of any
157
files manually\&. You must change the owner of any
144
jobs manually\. You must make any changes involving NIS on the NIS server\.
159
jobs manually\&. You must make any changes involving NIS on the NIS server\&.
145
160
.SH "CONFIGURATION"
147
162
The following configuration variables in
148
\fI/etc/login\.defs\fR
163
\fI/etc/login\&.defs\fR
149
164
change the behavior of this tool:
151
166
\fBMAIL_DIR\fR (string)
153
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\.
168
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\&.
156
171
\fBMAIL_FILE\fR (string)
158
Defines the location of the users mail spool files relatively to their home directory\.
173
Defines the location of the users mail spool files relatively to their home directory\&.
167
182
\fBusermod\fR, and
169
to create, move, or delete the user\'s mail spool\.
184
to create, move, or delete the user\'s mail spool\&.
172
187
\fBMAIL_CHECK_ENAB\fR
174
189
\fIyes\fR, they are also used to define the
176
environment variable\.
191
environment variable\&.
178
193
\fBMAX_MEMBERS_PER_GROUP\fR (number)
180
Maximum members per group entry\. When the maximum is reached, a new group entry (line) is started in
195
Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
182
(with the same name, same password, and same GID)\.
184
The default value is 0, meaning that there are no limits in the number of members in a group\.
186
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\.
188
If you need to enforce such limit, you can use 25\.
190
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\.
197
(with the same name, same password, and same GID)\&.
199
The default value is 0, meaning that there are no limits in the number of members in a group\&.
201
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\&.
203
If you need to enforce such limit, you can use 25\&.
205
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\&.
196
Group account information\.
211
Group account information\&.
199
214
\fI/etc/passwd\fR
201
User account information\.
216
User account information\&.
204
219
\fI/etc/shadow\fR
206
Secure user account information\.
221
Secure user account information\&.