154 lines
5.6 KiB
Groff
154 lines
5.6 KiB
Groff
|
.\" 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.
|
||
|
.\"
|
||
|
.\" $Id: usermod.8,v 1.6 1999/03/07 19:14:48 marekm Exp $
|
||
|
.\"
|
||
|
.TH USERMOD 8
|
||
|
.SH NAME
|
||
|
usermod \- Modify a user account
|
||
|
.SH SYNOPSIS
|
||
|
.TP 8
|
||
|
.B usermod
|
||
|
.\" .RB [ -A
|
||
|
.\" .RI { method | \fBDEFAULT\fR "},... ]"
|
||
|
.RB [ -c
|
||
|
.IR comment ]
|
||
|
.RB [ -d
|
||
|
.IR home_dir " ["
|
||
|
.BR -m ]]
|
||
|
.br
|
||
|
.RB [ -e
|
||
|
.IR expire_date ]
|
||
|
.RB [ -f
|
||
|
.IR inactive_time ]
|
||
|
.br
|
||
|
.RB [ -g
|
||
|
.IR initial_group ]
|
||
|
.RB [ -G
|
||
|
.IR group [,...]]
|
||
|
.br
|
||
|
.RB [ -l
|
||
|
.IR login_name ]
|
||
|
.RB [ -p
|
||
|
.IR passwd ]
|
||
|
.br
|
||
|
.RB [ -s
|
||
|
.IR shell ]
|
||
|
.RB [ -u
|
||
|
.IR uid " ["
|
||
|
.BR -o ]]
|
||
|
.I login
|
||
|
.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-A \fImethod\fR|\fBDEFAULT\fR"
|
||
|
.\" The new value of the user's authentication method.
|
||
|
.\" The authentication method is the name of a program which is responsible
|
||
|
.\" for validating the user's identity.
|
||
|
.\" The string \fBDEFAULT\fR may be used to change the user's authentication
|
||
|
.\" method to the standard system password method.
|
||
|
.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.
|
||
|
.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 crypt (3),
|
||
|
.BR groupadd (8),
|
||
|
.BR groupdel (8),
|
||
|
.BR groupmod (8),
|
||
|
.BR passwd (1),
|
||
|
.BR useradd (8),
|
||
|
.BR userdel (8)
|
||
|
.SH AUTHOR
|
||
|
Julianne Frances Haugh (jfh@bga.com)
|