~ubuntu-branches/ubuntu/raring/shadow/raring-proposed

« back to all changes in this revision

Viewing changes to man/usermod.8

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-05-05 09:45:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505094521-wpk2wn3q7957tlah
Tags: 1:4.1.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/stdout-encrypted-password.patch: chpasswd can report
    password hashes on stdout (debian bug 505640).
  - debian/login.pam: Enable SELinux support (debian bug 527106).
  - debian/securetty.linux: support Freescale MX-series (debian bug 527095).
* Add debian/patches/300_lastlog_failure: fixed upstream (debian bug 524873).
* Drop debian/patches/593_omit_lastchange_field_if_clock_is_misset: fixed
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: usermod
2
2
.\"    Author: 
3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4
 
.\"      Date: 04/03/2008
 
4
.\"      Date: 04/15/2009
5
5
.\"    Manual: System Management Commands
6
6
.\"    Source: System Management Commands
7
7
.\"
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
10
10
.nh
11
11
.\" disable justification (adjust text to left margin only)
19
19
.PP
20
20
The
21
21
\fBusermod\fR
22
 
command modifies the system account files to reflect the changes that are specified on the command line\.
 
22
command modifies the system account files to reflect the changes that are specified on the command line\&.
23
23
.SH "OPTIONS"
24
24
.PP
25
25
The options which apply to the
28
28
.PP
29
29
\fB\-a\fR, \fB\-\-append\fR
30
30
.RS 4
31
 
Add the user to the supplemental group(s)\. Use only with
 
31
Add the user to the supplemental group(s)\&. Use only with
32
32
\fB\-G\fR
33
 
option\.
 
33
option\&.
34
34
.RE
35
35
.PP
36
36
\fB\-c\fR, \fB\-\-comment\fR \fICOMMENT\fR
37
37
.RS 4
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
39
39
\fBchfn\fR(1)
40
 
utility\.
 
40
utility\&.
41
41
.RE
42
42
.PP
43
43
\fB\-d\fR, \fB\-\-home\fR \fIHOME_DIR\fR
44
44
.RS 4
45
 
The user\'s new login directory\. If the
 
45
The user\'s new login directory\&.
 
46
.sp
 
47
If the
46
48
\fB\-m\fR
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\&.
48
50
.RE
49
51
.PP
50
52
\fB\-e\fR, \fB\-\-expiredate\fR \fIEXPIRE_DATE\fR
51
53
.RS 4
52
 
The date on which the user account will be disabled\. The date is specified in the format
53
 
\fIYYYY\-MM\-DD\fR\.
 
54
The date on which the user account will be disabled\&. The date is specified in the format
 
55
\fIYYYY\-MM\-DD\fR\&.
54
56
.RE
55
57
.PP
56
58
\fB\-f\fR, \fB\-\-inactive\fR \fIINACTIVE\fR
57
59
.RS 4
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\&.
 
61
.sp
 
62
A value of 0 disables the account as soon as the password has expired, and a value of \-1 disables the feature\&.
59
63
.RE
60
64
.PP
61
65
\fB\-g\fR, \fB\-\-gid\fR \fIGROUP\fR
62
66
.RS 4
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\&.
64
68
.RE
65
69
.PP
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]]]
67
71
.RS 4
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
69
73
\fB\-g\fR
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
 
74
option\&.
 
75
.sp
 
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
71
77
\fB\-a\fR
72
 
option, which appends the user to the current supplementary group list\.
 
78
option, which appends the user to the current supplementary group list\&.
73
79
.RE
74
80
.PP
75
81
\fB\-l\fR, \fB\-\-login\fR \fINEW_LOGIN\fR
77
83
The name of the user will be changed from
78
84
\fILOGIN\fR
79
85
to
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\&.
81
87
.RE
82
88
.PP
83
89
\fB\-L\fR, \fB\-\-lock\fR
84
90
.RS 4
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
86
92
\fB\-p\fR
87
93
or
88
 
\fB\-U\fR\.
 
94
\fB\-U\fR\&.
89
95
.sp
90
96
Note: if you wish to lock the account (not only access with a password), you should also set the
91
97
\fIEXPIRE_DATE\fR
92
98
to
93
 
\fI1\fR\.
 
99
\fI1\fR\&.
94
100
.RE
95
101
.PP
96
102
\fB\-o\fR, \fB\-\-non\-unique\fR
97
103
.RS 4
98
104
When used with the
99
105
\fB\-u\fR
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\&.
101
107
.RE
102
108
.PP
103
109
\fB\-p\fR, \fB\-\-password\fR \fIPASSWORD\fR
104
110
.RS 4
105
111
The encrypted password, as returned by
106
 
\fBcrypt\fR(3)\.
 
112
\fBcrypt\fR(3)\&.
107
113
.RE
108
114
.PP
109
115
\fB\-s\fR, \fB\-\-shell\fR \fISHELL\fR
110
116
.RS 4
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\&.
112
118
.RE
113
119
.PP
114
120
\fB\-u\fR, \fB\-\-uid\fR \fIUID\fR
115
121
.RS 4
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\&.
 
123
.sp
 
124
This value must be unique, unless the
117
125
\fB\-o\fR
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\&.
 
127
.sp
 
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\&.
119
129
.RE
120
130
.PP
121
131
\fB\-U\fR, \fB\-\-unlock\fR
122
132
.RS 4
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
124
134
\fB\-p\fR
125
135
or
126
 
\fB\-L\fR\.
 
136
\fB\-L\fR\&.
127
137
.sp
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
132
142
\fIEXPIRE\fR
133
143
value from
134
 
\fI/etc/default/useradd\fR)\.
 
144
\fI/etc/default/useradd\fR)\&.
 
145
.RE
 
146
.PP
 
147
\fB\-Z\fR, \fB\-\-selinux\-user\fR \fISEUSER\fR
 
148
.RS 4
 
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\&.
135
150
.RE
136
151
.SH "CAVEATS"
137
152
.PP
138
153
 
139
154
\fBusermod\fR
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
141
156
\fBcrontab\fR
142
 
files manually\. You must change the owner of any
 
157
files manually\&. You must change the owner of any
143
158
\fBat\fR
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"
146
161
.PP
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:
150
165
.PP
151
166
\fBMAIL_DIR\fR (string)
152
167
.RS 4
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\&.
154
169
.RE
155
170
.PP
156
171
\fBMAIL_FILE\fR (string)
157
172
.RS 4
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\&.
159
174
.RE
160
175
.PP
161
176
The
166
181
\fBuseradd\fR,
167
182
\fBusermod\fR, and
168
183
\fBuserdel\fR
169
 
to create, move, or delete the user\'s mail spool\.
 
184
to create, move, or delete the user\'s mail spool\&.
170
185
.PP
171
186
If
172
187
\fBMAIL_CHECK_ENAB\fR
173
188
is set to
174
189
\fIyes\fR, they are also used to define the
175
190
\fBMAIL\fR
176
 
environment variable\.
 
191
environment variable\&.
177
192
.PP
178
193
\fBMAX_MEMBERS_PER_GROUP\fR (number)
179
194
.RS 4
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
181
196
\fI/etc/group\fR
182
 
(with the same name, same password, and same GID)\.
183
 
.sp
184
 
The default value is 0, meaning that there are no limits in the number of members in a group\.
185
 
.sp
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\.
187
 
.sp
188
 
If you need to enforce such limit, you can use 25\.
189
 
.sp
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)\&.
 
198
.sp
 
199
The default value is 0, meaning that there are no limits in the number of members in a group\&.
 
200
.sp
 
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\&.
 
202
.sp
 
203
If you need to enforce such limit, you can use 25\&.
 
204
.sp
 
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\&.
191
206
.RE
192
207
.SH "FILES"
193
208
.PP
194
209
\fI/etc/group\fR
195
210
.RS 4
196
 
Group account information\.
 
211
Group account information\&.
197
212
.RE
198
213
.PP
199
214
\fI/etc/passwd\fR
200
215
.RS 4
201
 
User account information\.
 
216
User account information\&.
202
217
.RE
203
218
.PP
204
219
\fI/etc/shadow\fR
205
220
.RS 4
206
 
Secure user account information\.
 
221
Secure user account information\&.
207
222
.RE
208
223
.SH "SEE ALSO"
209
224
.PP
218
233
\fBgroupmod\fR(8),
219
234
\fBlogin.defs\fR(5),
220
235
\fBuseradd\fR(8),
221
 
\fBuserdel\fR(8)\.
 
236
\fBuserdel\fR(8)\&.