2007-10-07 17:16:16 +05:30
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
|
|
|
|
<refentry id='usermod.8'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<!-- $Id: usermod.8.xml,v 1.18 2005/09/30 15:41:20 kloczek Exp $ -->
|
2007-10-07 17:16:16 +05:30
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>usermod</refentrytitle>
|
|
|
|
<manvolnum>8</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv id='name'>
|
|
|
|
<refname>usermod</refname>
|
|
|
|
<refpurpose>Modify a user account</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv id='synopsis'>
|
|
|
|
<cmdsynopsis>
|
2007-10-07 17:17:01 +05:30
|
|
|
<command>usermod</command>
|
2007-10-07 17:16:16 +05:30
|
|
|
<arg choice='opt'>-c <replaceable>comment</replaceable></arg>
|
|
|
|
<arg choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>-d <replaceable>home_dir</replaceable></arg>
|
|
|
|
<arg choice='opt'>-m </arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</arg>
|
|
|
|
<arg choice='opt'>-e <replaceable>expire_date</replaceable></arg>
|
2007-10-07 17:16:25 +05:30
|
|
|
<arg choice='opt'>-f <replaceable>inactive_days</replaceable></arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
<arg choice='opt'>-g <replaceable>initial_group</replaceable></arg>
|
|
|
|
<arg choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>-G <replaceable>group1</replaceable></arg>
|
|
|
|
<arg choice='opt'>
|
|
|
|
<arg choice='plain' rep='repeat'><replaceable>,group2,</replaceable></arg>
|
|
|
|
<arg choice='plain'><replaceable>,</replaceable></arg>
|
|
|
|
<arg choice='opt'><replaceable>groupN</replaceable></arg>
|
2007-10-07 17:16:34 +05:30
|
|
|
<arg choice='opt'>-a</arg>
|
2007-10-07 17:17:01 +05:30
|
|
|
</arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</arg>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='opt'>-l <replaceable>new_login_name</replaceable></arg>
|
|
|
|
<arg choice='opt'>-p <replaceable>password</replaceable></arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
<arg choice='opt'>-s <replaceable>shell</replaceable></arg>
|
|
|
|
<arg choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>-u <replaceable>uid</replaceable></arg>
|
|
|
|
<arg choice='opt'>-o </arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</arg>
|
|
|
|
<group choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>-L </arg>
|
2007-10-07 17:16:25 +05:30
|
|
|
<arg choice='plain'>-U </arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</group>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'><replaceable>login_name</replaceable></arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='description'>
|
|
|
|
<title>DESCRIPTION</title>
|
|
|
|
<para>
|
|
|
|
The <command>usermod</command> command modifies the system account
|
|
|
|
files to reflect the changes that are specified on the command line.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='options'>
|
|
|
|
<title>OPTIONS</title>
|
|
|
|
<para>
|
|
|
|
The options which apply to the <command>usermod</command> command
|
|
|
|
are:
|
|
|
|
</para>
|
|
|
|
<variablelist remap='IP'>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-c</option> <replaceable>comment</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new value of the user's password file comment field. It is
|
|
|
|
normally modified using the <citerefentry>
|
|
|
|
<refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
|
|
|
|
</citerefentry> utility.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-d</option> <replaceable>home_dir</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The user's new login directory. If the <option>-m</option>
|
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-e</option> <replaceable>expire_date</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The date on which the user account will be disabled. The date is
|
|
|
|
specified in the format <emphasis remap='I'>YYYY-MM-DD
|
|
|
|
</emphasis>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-f</option> <replaceable>inactive_days</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-g</option> <replaceable>initial_group</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-G</option>
|
|
|
|
<replaceable>group1</replaceable>[<emphasis remap='I'>,group2,...,</emphasis>[<emphasis remap='I'>groupN</emphasis>]]]
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
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 <option>-g</option>
|
|
|
|
option. If the user is currently a member of a group which is
|
|
|
|
not listed, the user will be removed from the group. This
|
|
|
|
behaviour can be changed via <option>-a</option> option, which
|
|
|
|
appends user to the current supplementary group list.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-l</option> <replaceable>new_login_name</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the user will be changed from <emphasis
|
|
|
|
remap='I'>login_name</emphasis> to <emphasis
|
|
|
|
remap='I'>new_login_name</emphasis>. Nothing else is changed. In
|
|
|
|
particular, the user's home directory name should probably be
|
|
|
|
changed to reflect the new login name.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-L</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
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 <option>-p</option> or
|
|
|
|
<option>-U</option>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-o</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
When used with the <option>-u</option> option, this option
|
|
|
|
allows to change the user ID to a non-unique value.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-p</option> <replaceable>password</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The encrypted password, as returned by <citerefentry>
|
|
|
|
<refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
|
|
|
|
</citerefentry>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-s</option> <replaceable>shell</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>The name of the user's new login shell. Setting this field
|
|
|
|
to blank causes the system to select the default login shell.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-u</option> <replaceable>uid</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The numerical value of the user's ID. This value must be unique,
|
|
|
|
unless the <option>-o</option> option is used. The value must be
|
|
|
|
non-negative. Values between 0 and 999 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.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-U</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Unlock a user's password. This removes the '!' in front of the
|
|
|
|
encrypted password. You can't use this option with
|
|
|
|
<option>-p</option> or <option>-L</option>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id='caveats'>
|
|
|
|
<title>CAVEATS</title>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>
|
|
|
|
<command>usermod</command> will not allow you to change the name of a
|
2007-10-07 17:16:16 +05:30
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='files'>
|
|
|
|
<title>FILES</title>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term><filename>/etc/group</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>group account information</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>/etc/login.defs</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>shadow password suite configuration</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term><filename>/etc/passwd</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>user account information</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term><filename>/etc/shadow</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>secure user account information</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id='see_also'>
|
|
|
|
<title>SEE ALSO</title>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
2007-10-07 17:16:34 +05:30
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>gpasswd</refentrytitle><manvolnum>8</manvolnum>
|
2007-10-07 17:16:34 +05:30
|
|
|
</citerefentry>,
|
2007-10-07 17:16:16 +05:30
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>useradd</refentrytitle><manvolnum>8</manvolnum>
|
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>userdel</refentrytitle><manvolnum>8</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='author'>
|
|
|
|
<title>AUTHOR</title>
|
|
|
|
<para>Julianne Frances Haugh (jockgrrl@ix.netcom.com)</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|