Penguin
Annotated edit history of usermod(8) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 USERMOD
2 !!!USERMOD
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 CAVEATS
7 FILES
8 SEE ALSO
9 AUTHOR
10 ----
11 !!NAME
12
13
14 usermod - Modify a user account
15 !!SYNOPSIS
16
17
18 __usermod__
19
20
21 [[__-c__ ''comment''] [[__-d__ ''home_dir'' [[
22 __-m__]]
23 [[__-e__ ''expire_date''] [[__-f__
24 ''inactive_time'']
25 [[__-g__ ''initial_group''] [[__-G__
26 ''group''[[,...]]
27 [[__-l__ ''login_name''] [[__-p__ ''passwd'']
28 [[__-s__ ''shell''] [[__-u__ ''uid'' [[ __-o__]]
29 [[__-L__|__-U__] ''login''
30 !!DESCRIPTION
31
32
33 The __usermod__ command modifies the system account files
34 to reflect the changes that are specified on the command
35 line. The options which apply to the __usermod__ command
36 are
37
38
39 __-c__ ''comment''
40
41
42 The new value of the user's password file comment field. It
43 is normally modified using the chfn(1)
44 utility.
45
46
47 __-d__ ''home_dir''
48
49
50 The user's new login directory. If the __-m__ option is
51 given the contents of the current home directory will be
52 moved to the new home directory, which is created if it does
53 not already exist.
54
55
56 __-e__ ''expire_date''
57
58
59 The date on which the user account will be disabled. The
60 date is specified in the format
61 ''YYYY-MM-DD''.
62
63
64 __-f__ ''inactive_days''
65
66
67 The number of days after a password expires until the
68 account is permanently disabled. A value of 0 disables the
69 account as soon as the password has expired, and a value of
70 -1 disables the feature. The default value is
71 -1.
72
73
74 __-g__ ''initial_group''
75
76
77 The group name or number of the user's new initial login
78 group. The group name must exist. A group number must refer
79 to an already existing group. The default group number is
80 1.
81
82
83 __-G__ ''group,[[...]''
84
85
86 A list of supplementary groups which the user is also a
87 member of. Each group is separated from the next by a comma,
88 with no intervening whitespace. The groups are subject to
89 the same restrictions as the group given with the __-g__
90 option. If the user is currently a member of a group which
91 is not listed, the user will be removed from the
92 group
93
94
95 __-l__ ''login_name''
96
97
98 The name of the user will be changed from ''login'' to
99 ''login_name''. Nothing else is changed. In particular,
100 the user's home directory name should probably be changed to
101 reflect the new login name.
102
103
104 __-p__ ''passwd''
105
106
107 The encrypted password, as returned by
108 crypt(3).
109
110
111 __-s__ ''shell''
112
113
114 The name of the user's new login shell. Setting this field
115 to blank causes the system to select the default login
116 shell.
117
118
119 __-u__ ''uid''
120
121
122 The numerical value of the user's ID. This value must be
123 unique, unless the ''-o'' option is used. The value must
124 be non-negative. Values between 0 and 99 are typically
125 reserved for system accounts. Any files which the user owns
126 and which are located in the directory tree rooted at the
127 user's home directory will have the file user ID changed
128 automatically. Files outside of the user's home directory
129 must be altered manually.
130
131
132 __-L__
133
134
135 Lock a user's password. This puts a '!' in front of the
136 encrypted password, effectively disabling the password. You
137 can't use this option with ''-p'' or
138 ''-U''.
139
140
141 __-U__
142
143
144 Unlock a user's password. This removes the '!' in front of
145 the encrypted password. You can't use this option with
146 ''-p'' or ''-L''.
147 !!CAVEATS
148
149
150 __usermod__ will not allow you to change the name of a
151 user who is logged in. You must make certain that the named
152 user is not executing any processes when this command is
153 being executed if the user's numerical user ID is being
154 changed. You must change the owner of any crontab files
155 manually. You must change the owner of any at jobs manually.
156 You must make any changes involving NIS on the NIS
157 server.
158 !!FILES
159
160
161 /etc/passwd - user account information
162 /etc/shadow - secure user account information
163 /etc/group - group information
164 !!SEE ALSO
165
166
167 chfn(1), chsh(1), crypt(3),
168 groupadd(8), groupdel(8), groupmod(8),
169 passwd(1), useradd(8),
170 userdel(8)
171 !!AUTHOR
172
173
174 Julianne Frances Haugh (jfh@austin.ibm.com)
175 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.