587 lines
15 KiB
HTML
587 lines
15 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of USERMOD</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>USERMOD</H1>
|
|
Section: Befehle zur Systemverwaltung (8)<BR>Updated: 28.05.2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
usermod - verändert ein Benutzerkonto
|
|
<A NAME="lbAC"> </A>
|
|
<H2>ÜBERSICHT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>usermod</B> [<I>Optionen</I>] <I>ANMELDENAME</I>
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>BESCHREIBUNG</H2>
|
|
|
|
<P>
|
|
|
|
<DD>The
|
|
<B>usermod</B>
|
|
command modifies the system account files to reflect the changes that are specified on the command line.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONEN</H2>
|
|
|
|
<P>
|
|
|
|
The options which apply to the
|
|
<B>usermod</B>
|
|
command are:
|
|
<P>
|
|
|
|
<B>-a</B>, <B>--append</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Add the user to the supplementary group(s). Use only with the
|
|
<B>-G</B>
|
|
option.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-b</B>, <B>--badnames</B>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
Allow names that do not conform to standards.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-c</B>, <B>--comment</B> <I>COMMENT</I>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
The new value of the user's password file comment field. It is normally modified using the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+chfn">chfn</A></B>(1)
|
|
utility.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-d</B>, <B>--home</B> <I>HOME_DIR</I>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
das neue Home-Verzeichnis des Benutzers
|
|
<P>
|
|
If the
|
|
<B>-m</B>
|
|
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.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-e</B>, <B>--expiredate</B> <I>EXPIRE_DATE</I>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
The date on which the user account will be disabled. The date is specified in the format
|
|
<I>YYYY-MM-DD</I>.
|
|
<P>
|
|
An empty
|
|
<I>EXPIRE_DATE</I>
|
|
argument will disable the expiration of the account.
|
|
<P>
|
|
This option requires a
|
|
/etc/shadow
|
|
file. A
|
|
/etc/shadow
|
|
entry will be created if there were none.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-f</B>, <B>--inactive</B> <I>INACTIVE</I>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Die Anzahl von Tagen, nach denen ein Passwort abgelaufen ist, bis das Konto deaktiviert wird.
|
|
<P>
|
|
Ein Wert von 0 deaktiviert das Konto, sobald das Passwort abläuft. Ein Wert von -1 schaltet diese Funktion ab.
|
|
<P>
|
|
This option requires a
|
|
/etc/shadow
|
|
file. A
|
|
/etc/shadow
|
|
entry will be created if there were none.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-g</B>, <B>--gid</B> <I>GROUP</I>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Der Name oder die Zahl der anfänglichen Anmeldegruppe eines neuen Benutzers. Der Gruppenname muss existieren.
|
|
<P>
|
|
Jede Datei im Home-Verzeichnis des Benutzers, die der alten Hauptgruppe des Benutzers gehörte, wird dieser neuen Gruppe gehören.
|
|
<P>
|
|
Die Gruppenzugehörigkeit von Dateien außerhalb des Home-Verzeichnisses des Benutzers muss per Hand angepasst werden.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-G</B>, <B>--groups</B> <I>GROUP1</I>[<I>,GROUP2,...</I>[<I>,GROUPN</I>]]]
|
|
<DL COMPACT><DT id="9"><DD>
|
|
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
|
|
<B>-g</B>
|
|
option.
|
|
<P>
|
|
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 the
|
|
<B>-a</B>
|
|
option, which appends the user to the current supplementary group list.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-l</B>, <B>--login</B> <I>NEW_LOGIN</I>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
The name of the user will be changed from
|
|
<I>LOGIN</I>
|
|
to
|
|
<I>NEW_LOGIN</I>. Nothing else is changed. In particular, the user's home directory or mail spool should probably be renamed manually to reflect the new login name.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-L</B>, <B>--lock</B>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
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
|
|
<B>-p</B>
|
|
or
|
|
<B>-U</B>.
|
|
<P>
|
|
Note: if you wish to lock the account (not only access with a password), you should also set the
|
|
<I>EXPIRE_DATE</I>
|
|
to
|
|
<I>1</I>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-m</B>, <B>--move-home</B>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
verschiebt den Inhalt des Home-Verzeichnisses eines Benutzers zu dem neuen Ziel
|
|
<P>
|
|
This option is only valid in combination with the
|
|
<B>-d</B>
|
|
(or
|
|
<B>--home</B>) option.
|
|
<P>
|
|
<B>usermod</B>
|
|
will try to adapt the ownership of the files and to copy the modes, ACL and extended attributes, but manual changes might be needed afterwards.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-o</B>, <B>--non-unique</B>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
When used with the
|
|
<B>-u</B>
|
|
option, this option allows to change the user ID to a non-unique value.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-p</B>, <B>--password</B> <I>PASSWORD</I>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
The encrypted password, as returned by
|
|
<B><A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A></B>(3).
|
|
<P>
|
|
<B>Note:</B>
|
|
This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.
|
|
<P>
|
|
The password will be written in the local
|
|
/etc/passwd
|
|
or
|
|
/etc/shadow
|
|
file. This might differ from the password database configured in your PAM configuration.
|
|
<P>
|
|
Sie sollten sicherstellen, dass das Passwort den Passwortrichtlinien des Systems entspricht.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-R</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
Apply changes in the
|
|
<I>CHROOT_DIR</I>
|
|
directory and use the configuration files from the
|
|
<I>CHROOT_DIR</I>
|
|
directory.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-P</B>, <B>--prefix</B> <I>PREFIX_DIR</I>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
Apply changes in the
|
|
<I>PREFIX_DIR</I>
|
|
directory and use the configuration files from the
|
|
<I>PREFIX_DIR</I>
|
|
directory. This option does not chroot and is intended for preparing a cross-compilation target. Some limitations: NIS and LDAP users/groups are not verified. PAM authentication is using the host files. No SELINUX support.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-s</B>, <B>--shell</B> <I>SHELL</I>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
Der Name der neuen Anmelde-Shell des Benutzers. Falls dieses Feld leer gelassen wird, verwendet das System die Standard-Anmelde-Shell.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-u</B>, <B>--uid</B> <I>UID</I>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
der neue numerische Wert der UID des Benutzers
|
|
<P>
|
|
This value must be unique, unless the
|
|
<B>-o</B>
|
|
option is used. The value must be non-negative.
|
|
<P>
|
|
Für die Mailbox des Benutzers und alle Dateien, die ihm gehören und sich in seinem Home-Verzeichnis befinden, wird die ID des Eigentümers automatisch angepasst.
|
|
<P>
|
|
Der Eigentümer von Dateien außerhalb des Home-Verzeichnisses des Benutzers muss per Hand angepasst werden.
|
|
<P>
|
|
No checks will be performed with regard to the
|
|
<B>UID_MIN</B>,
|
|
<B>UID_MAX</B>,
|
|
<B>SYS_UID_MIN</B>, or
|
|
<B>SYS_UID_MAX</B>
|
|
from
|
|
/etc/login.defs.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-U</B>, <B>--unlock</B>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
Unlock a user's password. This removes the '!' in front of the encrypted password. You can't use this option with
|
|
<B>-p</B>
|
|
or
|
|
<B>-L</B>.
|
|
<P>
|
|
Note: if you wish to unlock the account (not only access with a password), you should also set the
|
|
<I>EXPIRE_DATE</I>
|
|
(for example to
|
|
<I>99999</I>, or to the
|
|
<B>EXPIRE</B>
|
|
value from
|
|
/etc/default/useradd).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-v</B>, <B>--add-subuids</B> <I>FIRST</I>-<I>LAST</I>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
Add a range of subordinate uids to the user's account.
|
|
<P>
|
|
This option may be specified multiple times to add multiple ranges to a users account.
|
|
<P>
|
|
No checks will be performed with regard to
|
|
<B>SUB_UID_MIN</B>,
|
|
<B>SUB_UID_MAX</B>, or
|
|
<B>SUB_UID_COUNT</B>
|
|
from /etc/login.defs.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-V</B>, <B>--del-subuids</B> <I>FIRST</I>-<I>LAST</I>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
Remove a range of subordinate uids from the user's account.
|
|
<P>
|
|
This option may be specified multiple times to remove multiple ranges to a users account. When both
|
|
<B>--del-subuids</B>
|
|
and
|
|
<B>--add-subuids</B>
|
|
are specified, the removal of all subordinate uid ranges happens before any subordinate uid range is added.
|
|
<P>
|
|
No checks will be performed with regard to
|
|
<B>SUB_UID_MIN</B>,
|
|
<B>SUB_UID_MAX</B>, or
|
|
<B>SUB_UID_COUNT</B>
|
|
from /etc/login.defs.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-w</B>, <B>--add-subgids</B> <I>FIRST</I>-<I>LAST</I>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
Add a range of subordinate gids to the user's account.
|
|
<P>
|
|
This option may be specified multiple times to add multiple ranges to a users account.
|
|
<P>
|
|
No checks will be performed with regard to
|
|
<B>SUB_GID_MIN</B>,
|
|
<B>SUB_GID_MAX</B>, or
|
|
<B>SUB_GID_COUNT</B>
|
|
from /etc/login.defs.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-W</B>, <B>--del-subgids</B> <I>FIRST</I>-<I>LAST</I>
|
|
<DL COMPACT><DT id="23"><DD>
|
|
Remove a range of subordinate gids from the user's account.
|
|
<P>
|
|
This option may be specified multiple times to remove multiple ranges to a users account. When both
|
|
<B>--del-subgids</B>
|
|
and
|
|
<B>--add-subgids</B>
|
|
are specified, the removal of all subordinate gid ranges happens before any subordinate gid range is added.
|
|
<P>
|
|
No checks will be performed with regard to
|
|
<B>SUB_GID_MIN</B>,
|
|
<B>SUB_GID_MAX</B>, or
|
|
<B>SUB_GID_COUNT</B>
|
|
from /etc/login.defs.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-Z</B>, <B>--selinux-user</B> <I>SEUSER</I>
|
|
<DL COMPACT><DT id="24"><DD>
|
|
der neue SELinux-Benutzer für den Anmeldenamen des Benutzers
|
|
<P>
|
|
A blank
|
|
<I>SEUSER</I>
|
|
will remove the SELinux user mapping for user
|
|
<I>LOGIN</I>
|
|
(if any).
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>WARNUNGEN</H2>
|
|
|
|
<P>
|
|
|
|
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, the user's name, or the user's home directory is being changed.
|
|
<B>usermod</B>
|
|
checks this on Linux. On other platforms it only uses utmp to check if the user is logged in.
|
|
<P>
|
|
|
|
You must change the owner of any
|
|
<B>crontab</B>
|
|
files or
|
|
<B>at</B>
|
|
jobs manually.
|
|
<P>
|
|
|
|
Sie müssen alle Änderung in Bezug auf NIS auf dem NIS-Server vornehmen.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>KONFIGURATION</H2>
|
|
|
|
<P>
|
|
|
|
The following configuration variables in
|
|
/etc/login.defs
|
|
change the behavior of this tool:
|
|
<P>
|
|
|
|
<B>LASTLOG_UID_MAX</B> (number)
|
|
<DL COMPACT><DT id="25"><DD>
|
|
Highest user ID number for which the lastlog entries should be updated. As higher user IDs are usually tracked by remote user identity and authentication services there is no need to create a huge sparse lastlog file for them.
|
|
<P>
|
|
No
|
|
<B>LASTLOG_UID_MAX</B>
|
|
option present in the configuration means that there is no user ID limit for writing lastlog entries.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>MAIL_DIR</B> (string)
|
|
<DL COMPACT><DT id="26"><DD>
|
|
Das Verzeichnis des Mail-Spools. Diese Angabe wird benötigt, um die Mailbox zu bearbeiten, nachdem das entsprechende Benutzerkonto verändert oder gelöscht wurde. Falls nicht angegeben, wird ein Standard verwendet, der beim Kompilieren festgelegt wurde.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>MAIL_FILE</B> (string)
|
|
<DL COMPACT><DT id="27"><DD>
|
|
Legt den Ort der Mail-Spool-Dateien eines Benutzers relativ zu seinem Home-Verzeichnis fest.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
The
|
|
<B>MAIL_DIR</B>
|
|
and
|
|
<B>MAIL_FILE</B>
|
|
variables are used by
|
|
<B>useradd</B>,
|
|
<B>usermod</B>, and
|
|
<B>userdel</B>
|
|
to create, move, or delete the user's mail spool.
|
|
<P>
|
|
|
|
<B>MAX_MEMBERS_PER_GROUP</B> (number)
|
|
<DL COMPACT><DT id="28"><DD>
|
|
Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in
|
|
/etc/group
|
|
(with the same name, same password, and same GID).
|
|
<P>
|
|
Der Standardwert ist 0, was zur Folge hat, dass die Anzahl der Mitglieder einer Gruppe nicht begrenzt ist.
|
|
<P>
|
|
Diese Fähigkeit (der aufgeteilten Gruppe) ermöglicht es, die Zeilenlänge in der Gruppendatei zu begrenzen. Damit kann sichergestellt werden, dass die Zeilen für NIS-Gruppen nicht länger als 1024 Zeichen sind.
|
|
<P>
|
|
Falls Sie eine solche Begrenzung benötigen, können Sie 25 verwenden.
|
|
<P>
|
|
Hinweis: Aufgeteilte Gruppen werden möglicherweise nicht von allen Werkzeugen unterstützt, selbst nicht aus der Shadow-Werkzeugsammlung. Sie sollten diese Variable nur setzen, falls Sie zwingend darauf angewiesen sind.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>SUB_GID_MIN</B> (number), <B>SUB_GID_MAX</B> (number), <B>SUB_GID_COUNT</B> (number)
|
|
<DL COMPACT><DT id="29"><DD>
|
|
If
|
|
/etc/subuid
|
|
exists, the commands
|
|
<B>useradd</B>
|
|
and
|
|
<B>newusers</B>
|
|
(unless the user already have subordinate group IDs) allocate
|
|
<B>SUB_GID_COUNT</B>
|
|
unused group IDs from the range
|
|
<B>SUB_GID_MIN</B>
|
|
to
|
|
<B>SUB_GID_MAX</B>
|
|
for each new user.
|
|
<P>
|
|
The default values for
|
|
<B>SUB_GID_MIN</B>,
|
|
<B>SUB_GID_MAX</B>,
|
|
<B>SUB_GID_COUNT</B>
|
|
are respectively 100000, 600100000 and 65536.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>SUB_UID_MIN</B> (number), <B>SUB_UID_MAX</B> (number), <B>SUB_UID_COUNT</B> (number)
|
|
<DL COMPACT><DT id="30"><DD>
|
|
If
|
|
/etc/subuid
|
|
exists, the commands
|
|
<B>useradd</B>
|
|
and
|
|
<B>newusers</B>
|
|
(unless the user already have subordinate user IDs) allocate
|
|
<B>SUB_UID_COUNT</B>
|
|
unused user IDs from the range
|
|
<B>SUB_UID_MIN</B>
|
|
to
|
|
<B>SUB_UID_MAX</B>
|
|
for each new user.
|
|
<P>
|
|
The default values for
|
|
<B>SUB_UID_MIN</B>,
|
|
<B>SUB_UID_MAX</B>,
|
|
<B>SUB_UID_COUNT</B>
|
|
are respectively 100000, 600100000 and 65536.
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>DATEIEN</H2>
|
|
|
|
<P>
|
|
|
|
/etc/group
|
|
<DL COMPACT><DT id="31"><DD>
|
|
Informationen zu den Gruppenkonten
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/gshadow
|
|
<DL COMPACT><DT id="32"><DD>
|
|
sichere Informationen zu den Gruppenkonten
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/login.defs
|
|
<DL COMPACT><DT id="33"><DD>
|
|
Konfiguration der Shadow-Passwort-Werkzeugsammlung
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/passwd
|
|
<DL COMPACT><DT id="34"><DD>
|
|
Informationen zu den Benutzerkonten
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/shadow
|
|
<DL COMPACT><DT id="35"><DD>
|
|
verschlüsselte Informationen zu den Benutzerkonten
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/subgid
|
|
<DL COMPACT><DT id="36"><DD>
|
|
Per user subordinate group IDs.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/subuid
|
|
<DL COMPACT><DT id="37"><DD>
|
|
Per user subordinate user IDs.
|
|
</DL>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SIEHE AUCH</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+chfn">chfn</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+chsh">chsh</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+passwd">passwd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+gpasswd">gpasswd</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+groupadd">groupadd</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+groupdel">groupdel</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+groupmod">groupmod</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+login.defs">login.defs</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+subgid">subgid</A></B>(5), <B><A HREF="/cgi-bin/man/man2html?5+subuid">subuid</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+useradd">useradd</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+userdel">userdel</A></B>(8).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="38"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="39"><A HREF="#lbAC">ÜBERSICHT</A><DD>
|
|
<DT id="40"><A HREF="#lbAD">BESCHREIBUNG</A><DD>
|
|
<DT id="41"><A HREF="#lbAE">OPTIONEN</A><DD>
|
|
<DT id="42"><A HREF="#lbAF">WARNUNGEN</A><DD>
|
|
<DT id="43"><A HREF="#lbAG">KONFIGURATION</A><DD>
|
|
<DT id="44"><A HREF="#lbAH">DATEIEN</A><DD>
|
|
<DT id="45"><A HREF="#lbAI">SIEHE AUCH</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:04:58 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|