shadow/man/usermod.8

119 lines
4.5 KiB
Groff

.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "USERMOD" 8 "" "" ""
.SH NAME
usermod \- Modify a user account
.SH "SYNOPSIS"
.ad l
.hy 0
.HP 8
\fBusermod\fR [\-c\ \fIcomment\fR] [\-d\ \fIhome_dir\fR\ [\-m]] [\-e\ \fIexpire_date\fR] [\-f\ \fIinactive_days\fR] [\-g\ \fIinitial_group\fR] [\-G\ \fIgroup1\fR\ [\fI,group2,\fR...\ \fI,\fR\ [\fIgroupN\fR]]] [\-l\ \fIlogin_name\fR] [\-p\ \fIpasswd\fR] [\-s\ \fIshell\fR] [\-u\ \fIuid\fR\ [\-o]] [\fB\-L\fR | \fB\-U\fR] \fIlogin\fR
.ad
.hy
.SH "DESCRIPTION"
.PP
The \fBusermod\fR command modifies the system account files to reflect the changes that are specified on the command line\&.
.SH "OPTIONS"
.PP
The options which apply to the \fBusermod\fR command are:
.TP
\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\&.
.TP
\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\&.
.TP
\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\&.
.TP
\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\&.
.TP
\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\&. The default group number is 1\&.
.TP
\fB\-G\fR \fIgroup1\fR[\fI ,group2,\&.\&.\&., \fR [\fIgroupN\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\&.
.TP
\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\&.
.TP
\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 \fB\-p\fR or \fB\-U\fR\&.
.TP
\fB\-o\fR
When used with the \fB\-u\fR option, this option allows to change the user ID to a non\-unique value\&.
.TP
\fB\-p\fR \fIpasswd\fR
The encrypted password, as returned by \fBcrypt\fR(3)\&.
.TP
\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\&.
.TP
\fB\-u\fR \fIuid\fR
The numerical value of the user's ID\&. This value must be unique, unless the \fB\-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\&.
.TP
\fB\-U\fR
Unlock a user's password\&. This removes the '!' in front of the encrypted password\&. You can't use this option with \fB\-p\fR or \fB\-L\fR\&.
.SH "CAVEATS"
.PP
\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"
.TP
\fI/etc/passwd\fR
user account information
.TP
\fI/etc/shadow\fR
secure user account information
.TP
\fI/etc/group\fR
group account information
.SH "SEE ALSO"
.PP
\fBchfn\fR(1), \fBchsh\fR(1), \fBpasswd\fR(1), \fBcrypt\fR(3), \fBgroupadd\fR(8), \fBgroupdel\fR(8), \fBgroupmod\fR(8), \fBuseradd\fR(8), \fBuserdel\fR(8)\&.
.SH "AUTHOR"
.PP
Julianne Frances Haugh (jockgrrl@ix\&.netcom\&.com)