2007-10-07 17:15:49 +05:30
|
|
|
.\"$Id: usermod.8,v 1.17 2004/11/02 19:28:31 kloczek Exp $
|
2007-10-07 17:14:44 +05:30
|
|
|
.\" 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
|
2007-10-07 17:14:51 +05:30
|
|
|
\fBusermod\fR [\fB-c\fR \fIcomment\fR] [\fB-d\fR \fIhome_dir\fR [\fB-m\fR]]
|
2007-10-07 17:14:44 +05:30
|
|
|
.br
|
2007-10-07 17:14:51 +05:30
|
|
|
[\fB-e\fR \fIexpire_date\fR] [\fB-f\fR \fIinactive_time\fR]
|
2007-10-07 17:14:44 +05:30
|
|
|
.br
|
2007-10-07 17:14:51 +05:30
|
|
|
[\fB-g\fR \fIinitial_group\fR] [\fB-G\fR \fIgroup\fR [,...]]
|
2007-10-07 17:14:44 +05:30
|
|
|
.br
|
2007-10-07 17:14:51 +05:30
|
|
|
[\fB-l\fR \fIlogin_name\fR] [\fB-p\fR \fIpasswd\fR]
|
2007-10-07 17:14:44 +05:30
|
|
|
.br
|
2007-10-07 17:14:51 +05:30
|
|
|
[\fB-s\fR \fIshell\fR] [\fB-u\fR \fIuid\fR [\fB-o\fR]] [\fB-L\fR|\fB-U\fR]
|
|
|
|
\fIlogin\fR
|
2007-10-07 17:14:44 +05:30
|
|
|
.SH DESCRIPTION
|
2007-10-07 17:15:23 +05:30
|
|
|
The \fBusermod\fR command modifies the system account files to reflect the
|
2007-10-07 17:15:49 +05:30
|
|
|
changes that are specified on the command line.
|
|
|
|
.SH OPTIONS
|
|
|
|
The options which apply to the \fBusermod\fR command are:
|
2007-10-07 17:15:23 +05:30
|
|
|
.IP "\fB-c\fR \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\fR \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\fR \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\fR \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\fR \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.
|
2007-10-07 17:14:44 +05:30
|
|
|
The default group number is 1.
|
2007-10-07 17:15:23 +05:30
|
|
|
.IP "\fB-G\fR \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\fR \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.
|
2007-10-07 17:15:40 +05:30
|
|
|
.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.
|
2007-10-07 17:15:23 +05:30
|
|
|
.IP "\fB-p\fR \fIpasswd\fR"
|
|
|
|
The encrypted password, as returned by \fBcrypt\fR(3).
|
|
|
|
.IP "\fB-s\fR \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\fR \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.
|
2007-10-07 17:14:44 +05:30
|
|
|
.IP "\fB-U\fR"
|
2007-10-07 17:15:23 +05:30
|
|
|
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.
|
2007-10-07 17:14:44 +05:30
|
|
|
.SH CAVEATS
|
|
|
|
\fBusermod\fR will not allow you to change the name of a user who is
|
2007-10-07 17:15:23 +05:30
|
|
|
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.
|
2007-10-07 17:14:44 +05:30
|
|
|
.SH FILES
|
2007-10-07 17:15:23 +05:30
|
|
|
\fI/etc/passwd\fR \ - user account information
|
2007-10-07 17:14:44 +05:30
|
|
|
.br
|
2007-10-07 17:15:23 +05:30
|
|
|
\fI/etc/shadow\fR \ - secure user account information
|
2007-10-07 17:14:44 +05:30
|
|
|
.br
|
2007-10-07 17:15:23 +05:30
|
|
|
\fI/etc/group\fR \ - group information
|
2007-10-07 17:14:44 +05:30
|
|
|
.SH SEE ALSO
|
|
|
|
.BR chfn (1),
|
|
|
|
.BR chsh (1),
|
2007-10-07 17:15:14 +05:30
|
|
|
.BR passwd (1),
|
2007-10-07 17:14:44 +05:30
|
|
|
.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)
|