Manpage improvements for usermod

Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
Markus Hiereth 2022-03-06 18:12:13 -06:00 committed by Serge Hallyn
parent 10b2e1e7c5
commit 2f30d235c2

View File

@ -62,7 +62,7 @@
<title>DESCRIPTION</title> <title>DESCRIPTION</title>
<para> <para>
The <command>usermod</command> command modifies the system account The <command>usermod</command> command modifies the system account
files to reflect the changes that are specified on the command line. files.
</para> </para>
</refsect1> </refsect1>
@ -100,8 +100,8 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The new value of the user's password file comment field. It is update the comment field of the user in <filename>/etc/passwd
normally modified using the <citerefentry> </filename>, which is normally modified using the <citerefentry>
<refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum> <refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
</citerefentry> utility. </citerefentry> utility.
</para> </para>
@ -130,12 +130,15 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The date on which the user account will be disabled. The date is The date on which the user account will be disabled. The
specified in the format <emphasis remap='I'>YYYY-MM-DD</emphasis>. date is specified in the format
<emphasis remap=\"I\">YYYY-MM-DD</emphasis>. Integers as input are
interpreted as days after 1970-01-01.
</para> </para>
<para> <para>
An empty <replaceable>EXPIRE_DATE</replaceable> argument will An input of -1 or an empty string will blank the account
disable the expiration of the account. expiration field in the shadow password file. The account
will remain available with no date limit.
</para> </para>
<para> <para>
This option requires a <filename>/etc/shadow</filename> file. This option requires a <filename>/etc/shadow</filename> file.
@ -150,13 +153,14 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The number of days after a password expires until the account is defines the number of days after the password exceeded its maximum
permanently disabled. age during which the user may still login by immediately replacing
</para> the password. This grace period before the account becomes inactive
<para> is stored in the shadow password file. An input of 0 will disable an
A value of 0 disables the account as soon expired password with no delay. An input of -1 will blank the
as the password has expired, and a value of -1 disables the respective field in the shadow password file. See <citerefentry>
feature. <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
</citerefentry> for more information.
</para> </para>
<para> <para>
This option requires a <filename>/etc/shadow</filename> file. This option requires a <filename>/etc/shadow</filename> file.
@ -171,7 +175,7 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The group name or number of the user's new initial login group. The name or numerical ID of the user's new primary group.
The group must exist. The group must exist.
</para> </para>
<para> <para>
@ -198,9 +202,7 @@
<para> <para>
A list of supplementary groups which the user is also a member 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 of. Each group is separated from the next by a comma, with no
intervening whitespace. The groups are subject to the same intervening whitespace. The groups must exist.
restrictions as the group given with the <option>-g</option>
option.
</para> </para>
<para> <para>
If the user is currently a member of a group which is If the user is currently a member of a group which is
@ -249,7 +251,7 @@
</term> </term>
<listitem> <listitem>
<para> <para>
Move the content of the user's home directory to the new moves the content of the user's home directory to the new
location. If the current home directory does not exist location. If the current home directory does not exist
the new home directory will not be created. the new home directory will not be created.
</para> </para>
@ -270,9 +272,17 @@
</term> </term>
<listitem> <listitem>
<para> <para>
When used with the <option>-u</option> option, this option
allows to change the user ID to a non-unique value. allows to change the user ID to a non-unique value.
</para> </para>
<para>
This option is only valid in combination with the
<option>-u</option> option. As a user identity
serves as
key to map between users on one hand and permissions, file
ownerships and other aspects that determine the system's
behavior on the other hand, more than one login name
will access the account of the given UID.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -281,13 +291,13 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The encrypted password, as returned by <citerefentry> defines a new password for the user. PASSWORD is expected to
<refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum> be encrypted, as returned by <citerefentry><refentrytitle>crypt
</citerefentry>. </refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para> </para>
<para> <para>
<emphasis role="bold">Note:</emphasis> This option is not <emphasis role="bold">Note:</emphasis> Avoid this option on the
recommended because the password (or encrypted password) will command line because the password (or encrypted password) will
be visible by users listing the processes. be visible by users listing the processes.
</para> </para>
<para condition="pam"> <para condition="pam">
@ -331,14 +341,13 @@
</term> </term>
<listitem> <listitem>
<para> <para>
Apply changes in the <replaceable>PREFIX_DIR</replaceable> Apply changes within the directory tree starting with
directory and use the configuration files from the <replaceable>PREFIX_DIR</replaceable> and use as well the
<replaceable>PREFIX_DIR</replaceable> directory. configuration files located there. This option does not
This option does not chroot and is intended for preparing chroot and is intended for preparing a cross-compilation
a cross-compilation target. target. Some limitations: NIS and LDAP users/groups are
Some limitations: NIS and LDAP users/groups are not verified. not verified. PAM authentication is using the host
PAM authentication is using the host files. files. No SELINUX support.
No SELINUX support.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -348,8 +357,9 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The path of the user's new login shell. Setting this field to changes the user's login shell. An empty string for SHELL blanks the
blank causes the system to select the default login shell. field in <filename>/etc/passwd</filename> and logs the user into the
system's default shell.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -359,7 +369,7 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The new numerical value of the user's ID. The new value of the user's ID.
</para> </para>
<para> <para>
This value must be unique, This value must be unique,
@ -418,7 +428,7 @@
Add a range of subordinate uids to the user's account. Add a range of subordinate uids to the user's account.
</para> </para>
<para> <para>
This option may be specified multiple times to add multiple ranges to a users account. This option may be specified multiple times to add multiple ranges to a user's account.
</para> </para>
<para> <para>
No checks will be performed with regard to No checks will be performed with regard to
@ -436,7 +446,7 @@
Remove a range of subordinate uids from the user's account. Remove a range of subordinate uids from the user's account.
</para> </para>
<para> <para>
This option may be specified multiple times to remove multiple ranges to a users account. This option may be specified multiple times to remove multiple ranges to a user's account.
When both <option>--del-subuids</option> and <option>--add-subuids</option> are specified, When both <option>--del-subuids</option> and <option>--add-subuids</option> are specified,
the removal of all subordinate uid ranges happens before any subordinate uid range is added. the removal of all subordinate uid ranges happens before any subordinate uid range is added.
</para> </para>
@ -456,7 +466,7 @@
Add a range of subordinate gids to the user's account. Add a range of subordinate gids to the user's account.
</para> </para>
<para> <para>
This option may be specified multiple times to add multiple ranges to a users account. This option may be specified multiple times to add multiple ranges to a user's account.
</para> </para>
<para> <para>
No checks will be performed with regard to No checks will be performed with regard to
@ -474,7 +484,7 @@
Remove a range of subordinate gids from the user's account. Remove a range of subordinate gids from the user's account.
</para> </para>
<para> <para>
This option may be specified multiple times to remove multiple ranges to a users account. This option may be specified multiple times to remove multiple ranges to a user's account.
When both <option>--del-subgids</option> and <option>--add-subgids</option> are specified, When both <option>--del-subgids</option> and <option>--add-subgids</option> are specified,
the removal of all subordinate gid ranges happens before any subordinate gid range is added. the removal of all subordinate gid ranges happens before any subordinate gid range is added.
</para> </para>
@ -491,12 +501,11 @@
</term> </term>
<listitem> <listitem>
<para> <para>
The new SELinux user for the user's login. defines the SELinux user to be mapped with
</para> <replaceable>LOGIN</replaceable>. An empty string ("")
<para> will remove the respective entry (if any). Note that the
A blank <replaceable>SEUSER</replaceable> will remove the shadow system doesn't store the selinux-user, it uses
SELinux user mapping for user <replaceable>LOGIN</replaceable> semanage(8) for that.
(if any).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -510,7 +519,8 @@
not executing any processes when this command is being executed if the not executing any processes when this command is being executed if the
user's numerical user ID, the user's name, or the user's home user's numerical user ID, the user's name, or the user's home
directory is being changed. <command>usermod</command> checks this directory is being changed. <command>usermod</command> checks this
on Linux. On other platforms it only uses utmp to check if the user is logged in. on Linux. On other operating systems it only uses utmp to check if
the user is logged in.
</para> </para>
<para> <para>
You must change the owner of any <command>crontab</command> files or You must change the owner of any <command>crontab</command> files or
@ -545,43 +555,43 @@
<varlistentry> <varlistentry>
<term><filename>/etc/group</filename></term> <term><filename>/etc/group</filename></term>
<listitem> <listitem>
<para>Group account information.</para> <para>Group account information</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry condition="gshadow"> <varlistentry condition="gshadow">
<term><filename>/etc/gshadow</filename></term> <term><filename>/etc/gshadow</filename></term>
<listitem> <listitem>
<para>Secure group account information.</para> <para>Secure group account informatio.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/etc/login.defs</filename></term> <term><filename>/etc/login.defs</filename></term>
<listitem> <listitem>
<para>Shadow password suite configuration.</para> <para>Shadow password suite configuration</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/etc/passwd</filename></term> <term><filename>/etc/passwd</filename></term>
<listitem> <listitem>
<para>User account information.</para> <para>User account information</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/etc/shadow</filename></term> <term><filename>/etc/shadow</filename></term>
<listitem> <listitem>
<para>Secure user account information.</para> <para>Secure user account information</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry condition="subids"> <varlistentry condition="subids">
<term><filename>/etc/subgid</filename></term> <term><filename>/etc/subgid</filename></term>
<listitem> <listitem>
<para>Per user subordinate group IDs.</para> <para>Per user subordinate group IDs</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry condition="subids"> <varlistentry condition="subids">
<term><filename>/etc/subuid</filename></term> <term><filename>/etc/subuid</filename></term>
<listitem> <listitem>
<para>Per user subordinate user IDs.</para> <para>Per user subordinate user IDs</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>