134 lines
5.6 KiB
Groff
134 lines
5.6 KiB
Groff
.\"$Id: usermod.8,v 1.12 2002/03/08 04:39:12 kloczek Exp $
|
|
.\" Copyright 1991 - 1994, Julianne Frances Haugh
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.TH USERMOD 8
|
|
.SH NAME
|
|
usermod \- Modify a user account
|
|
.SH SYNOPSIS
|
|
.TP 8
|
|
\fBusermod\fR [\fB-c\fR \fIcomment\fR] [\fB-d\fR \fIhome_dir\fR [\fB-m\fR]]
|
|
.br
|
|
[\fB-e\fR \fIexpire_date\fR] [\fB-f\fR \fIinactive_time\fR]
|
|
.br
|
|
[\fB-g\fR \fIinitial_group\fR] [\fB-G\fR \fIgroup\fR [,...]]
|
|
.br
|
|
[\fB-l\fR \fIlogin_name\fR] [\fB-p\fR \fIpasswd\fR]
|
|
.br
|
|
[\fB-s\fR \fIshell\fR] [\fB-u\fR \fIuid\fR [\fB-o\fR]] [\fB-L\fR|\fB-U\fR]
|
|
\fIlogin\fR
|
|
.SH DESCRIPTION
|
|
The \fBusermod\fR command modifies the system account files to reflect
|
|
the changes that are specified on the command line.
|
|
The options which apply to the \fBusermod\fR command are:
|
|
.IP "\fB-c \fIcomment\fR"
|
|
The new value of the user's password file comment field.
|
|
It is normally modified using the \fBchfn\fR(1) utility.
|
|
.IP "\fB-d \fIhome_dir\fR"
|
|
The user's new login directory.
|
|
If the \fB-m\fR 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.
|
|
.IP "\fB-e \fIexpire_date\fR"
|
|
The date on which the user account will be disabled.
|
|
The date is specified in the format \fIYYYY-MM-DD\fR.
|
|
.IP "\fB-f \fIinactive_days\fR"
|
|
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.
|
|
.IP "\fB-g \fIinitial_group\fR"
|
|
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.
|
|
.IP "\fB-G \fIgroup,[...]\fR"
|
|
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 \fB-g\fR option.
|
|
If the user is currently a member of a group which is not listed,
|
|
the user will be removed from the group
|
|
.IP "\fB-l \fIlogin_name\fR"
|
|
The name of the user will be changed from \fIlogin\fR to
|
|
\fIlogin_name\fR.
|
|
Nothing else is changed.
|
|
In particular, the user's home directory name should probably
|
|
be changed to reflect the new login name.
|
|
.IP "\fB-p \fIpasswd\fR"
|
|
The encrypted password, as returned by \fBcrypt\fR(3).
|
|
.IP "\fB-s \fIshell\fR"
|
|
The name of the user's new login shell.
|
|
Setting this field to blank causes the system
|
|
to select the default login shell.
|
|
.IP "\fB-u \fIuid\fR"
|
|
The numerical value of the user's ID.
|
|
This value must be unique, unless the \fI-o\fR option is used.
|
|
The value must be non-negative.
|
|
Values between 0 and 99 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.
|
|
.IP "\fB-L\fR"
|
|
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 \fI-p\fR or \fI-U\fR.
|
|
.IP "\fB-U\fR"
|
|
Unlock a user's password.
|
|
This removes the '!' in front of the encrypted password.
|
|
You can't use this option with \fI-p\fR or \fI-L\fR.
|
|
.SH CAVEATS
|
|
\fBusermod\fR 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 crontab files manually.
|
|
You must change the owner of any at jobs manually.
|
|
You must make any changes involving NIS on the NIS server.
|
|
.SH FILES
|
|
/etc/passwd \- user account information
|
|
.br
|
|
/etc/shadow \- secure user account information
|
|
.br
|
|
/etc/group \- group information
|
|
.SH SEE ALSO
|
|
.BR chfn (1),
|
|
.BR chsh (1),
|
|
.BR passwd (1),
|
|
.BR crypt (3),
|
|
.BR groupadd (8),
|
|
.BR groupdel (8),
|
|
.BR groupmod (8),
|
|
.BR useradd (8),
|
|
.BR userdel (8)
|
|
.SH AUTHOR
|
|
Julianne Frances Haugh (jockgrrl@ix.netcom.com)
|