useradd

Aus Foxwiki


useradd - erstellt einen neuen Benutzer oder aktualisiert die Standardwerte für neue Benutzer

Beschreibung

useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.

When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line plus the default values from the system. Depending on command line options, the useradd command will update system files and may also create the new user's home directory and copy initial files.

By default, a group will also be created for the new user (see -g, -N, -U, and USERGROUPS_ENAB).

Installation

Syntax

useradd [options] LOGIN
useradd -D
useradd -D [options]

Optionen

Parameter

Umgebungsvariablen

Exit-Status

0 success
1 can't update password file
2 invalid command syntax
3 invalid argument to option
4 UID already in use (and no -o)
6 specified group doesn't exist
9 username or group name already in use
10 can't update group file
12 can't create home directory
14 can't update SELinux user mapping

Anwendung

Problembehebung

Konfiguration

Dateien

Anhang

Siehe auch

shadow-utils 4.16.0

Dokumentation

Man-Page

chfn(1) chsh(1) passwd(1) crypt(3) groupadd(8) groupdel(8) groupmod(8) login.defs(5) newusers(8) subgid(5) subuid(5) userdel(8) usermod(8)

Info-Pages

Links

Projekt
Weblinks

TMP

ANMERKUNGEN

The system administrator is responsible for placing the default user files in the /etc/skel/ directory (or any other skeleton directory specified in /etc/default/useradd or on the command line).

WARNUNGEN

Sie dürfen einer NIS- oder LDAP-Gruppe keine Benutzer hinzufügen. Dies muss auf dem entsprechenden Server durchgeführt werden.

Similarly, if the username already exists in an external user database such as NIS or LDAP, useradd will deny the user account creation request.

Usernames may contain only lower and upper case letters, digits, underscores, or dashes. They can end with a dollar sign. Dashes are not allowed at the beginning of the username. Fully numeric usernames and usernames . or .. are also disallowed. It is not recommended to use usernames beginning with . character as their home directories will be hidden in the ls output.

Benutzernamen dürfen nur bis zu 256 Zeichen lang sein.

On Debian, the only constraints are that usernames must neither start with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace (space: ' ', end of line: '\n', tabulation: '\t', etc.). Note that using a slash ('/') may break the default algorithm for the definition of the user's home directory.

KONFIGURATION

The following configuration variables in /etc/login.defs change the behavior of this tool:

DATEIEN

/etc/passwd Informationen zu den Benutzerkonten
/etc/shadow geschützte Informationen zu den Benutzerkonten
/etc/group Informationen zu den Gruppenkonten
/etc/gshadow geschützte Informationen zu den Gruppenkonten
/etc/default/useradd Standardwerte für die Erstellung eines Kontos
/etc/shadow-maint/useradd-pre.d/*, /etc/shadow-maint/useradd-post.d/* Run-part files to execute during user addition. The environment variable ACTION will be populated with useradd and SUBJECT with the username. useradd-pre.d will be executed prior to any user addition. useradd-post.d will execute after user addition. If a script exits non-zero then execution will terminate
/etc/skel/ Verzeichnis, das die Dateien mit Standardwerten enthält
/etc/subgid enthält untergeordnete Gruppenkennungen der einzelnen Benutzer
/etc/subuid enthält untergeordnete Benutzerkennungen der einzelnen Benutzer
/etc/login.defs konfiguriert die Shadow-Hilfsprogramme