OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / shadow / original / man8 / usermod.8
1 .\"$Id: usermod.8,v 1.12 2002/03/08 04:39:12 kloczek Exp $
2 .\" Copyright 1991 - 1994, Julianne Frances Haugh
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
14 .\"    may be used to endorse or promote products derived from this software
15 .\"    without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED.  IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" SUCH DAMAGE.
28 .TH USERMOD 8
29 .SH NAME
30 usermod \- Modify a user account
31 .SH SYNOPSIS
32 .TP 8
33 \fBusermod\fR [\fB-c\fR \fIcomment\fR] [\fB-d\fR \fIhome_dir\fR [\fB-m\fR]]
34 .br
35 [\fB-e\fR \fIexpire_date\fR] [\fB-f\fR \fIinactive_time\fR]
36 .br
37 [\fB-g\fR \fIinitial_group\fR] [\fB-G\fR \fIgroup\fR [,...]]
38 .br
39 [\fB-l\fR \fIlogin_name\fR] [\fB-p\fR \fIpasswd\fR]
40 .br
41 [\fB-s\fR \fIshell\fR] [\fB-u\fR \fIuid\fR [\fB-o\fR]] [\fB-L\fR|\fB-U\fR]
42 \fIlogin\fR
43 .SH DESCRIPTION
44 The \fBusermod\fR command modifies the system account files to reflect
45 the changes that are specified on the command line.
46 The options which apply to the \fBusermod\fR command are:
47 .IP "\fB-c \fIcomment\fR"
48 The new value of the user's password file comment field.
49 It is normally modified using the \fBchfn\fR(1) utility.
50 .IP "\fB-d \fIhome_dir\fR"
51 The user's new login directory.
52 If the \fB-m\fR option is given the contents of the current home directory
53 will be moved to the new home directory, which is created if it does not
54 already exist.
55 .IP "\fB-e \fIexpire_date\fR"
56 The date on which the user account will be disabled.
57 The date is specified in the format \fIYYYY-MM-DD\fR.
58 .IP "\fB-f \fIinactive_days\fR"
59 The number of days after a password expires until the account
60 is permanently disabled.
61 A value of 0 disables the account as soon as the password has
62 expired, and a value of -1 disables the feature.
63 The default value is -1.
64 .IP "\fB-g \fIinitial_group\fR"
65 The group name or number of the user's new initial login group.
66 The group name must exist.  A group number must refer to an
67 already existing group.
68 The default group number is 1.
69 .IP "\fB-G \fIgroup,[...]\fR"
70 A list of supplementary groups which the user is also a member
71 of.
72 Each group is separated from the next by a comma, with no
73 intervening whitespace.
74 The groups are subject to the same restrictions as the group
75 given with the \fB-g\fR option.
76 If the user is currently a member of a group which is not listed,
77 the user will be removed from the group
78 .IP "\fB-l \fIlogin_name\fR"
79 The name of the user will be changed from \fIlogin\fR to
80 \fIlogin_name\fR.
81 Nothing else is changed.
82 In particular, the user's home directory name should probably
83 be changed to reflect the new login name.
84 .IP "\fB-p \fIpasswd\fR"                                                
85 The encrypted password, as returned by \fBcrypt\fR(3).                      
86 .IP "\fB-s \fIshell\fR"
87 The name of the user's new login shell.
88 Setting this field to blank causes the system
89 to select the default login shell.
90 .IP "\fB-u \fIuid\fR"
91 The numerical value of the user's ID.
92 This value must be unique, unless the \fI-o\fR option is used.
93 The value must be non-negative.
94 Values between 0 and 99 are typically reserved for system accounts.
95 Any files which the user owns and which are located in the directory
96 tree rooted at the user's home directory will have the file user ID
97 changed automatically.
98 Files outside of the user's home directory must be altered manually.
99 .IP "\fB-L\fR"
100 Lock a user's password.
101 This puts a '!' in front of the encrypted password, effectively disabling
102 the password.  You can't use this option with \fI-p\fR or \fI-U\fR.
103 .IP "\fB-U\fR"
104 Unlock a user's password.
105 This removes the '!' in front of the encrypted password.
106 You can't use this option with \fI-p\fR or \fI-L\fR.
107 .SH CAVEATS
108 \fBusermod\fR will not allow you to change the name of a user who is
109 logged in.
110 You must make certain that the named user is not executing any processes
111 when this command is being executed if the user's numerical user ID is
112 being changed.
113 You must change the owner of any crontab files manually.
114 You must change the owner of any at jobs manually.
115 You must make any changes involving NIS on the NIS server.
116 .SH FILES
117 /etc/passwd \- user account information
118 .br
119 /etc/shadow \- secure user account information
120 .br
121 /etc/group \- group information
122 .SH SEE ALSO
123 .BR chfn (1),
124 .BR chsh (1),
125 .BR passwd (1),
126 .BR crypt (3),
127 .BR groupadd (8),
128 .BR groupdel (8),
129 .BR groupmod (8),
130 .BR useradd (8),
131 .BR userdel (8)
132 .SH AUTHOR
133 Julianne Frances Haugh (jockgrrl@ix.netcom.com)