create a new user or update default new user information
|
-M
Do no create the user's home directory, even if the system wide setting from /etc/login.defs
(CREATE_HOME) is set to yes.
|
-N, --no-user-group
Do not create a group with the same name as the user, but add the user to the group specified by the
-g option or by the GROUP variable in /etc/default/useradd.
The default behavior (if the -g, -N, and -U options are not specified) is defined by the
USERGROUPS_ENAB variable in /etc/login.defs.
|
-d, --home HOME_DIR
The new user will be created using HOME_DIR as the value for the user's login directory. The default
is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory
HOME_DIR does not have to exist but will not be created if it is missing.
|
-s, --shell SHELL
The name of the user's login shell. The default is to leave this field blank, which causes the system
to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an
empty string by default.
|
-g, --gid GROUP
The group name or number of the user's initial login group. The group name must exist. A group number
must refer to an already existing group.
If not specified, the behavior of useradd will depend on the USERGROUPS_ENAB variable in
/etc/login.defs. If this variable is set to yes (or -U/--user-group is specified on the command
line), a group will be created for the user, with the same name as her loginname. If the variable is
set to no (or -N/--no-user-group is specified on the command line), useradd will set the primary
group of the new user to the value specified by the GROUP variable in /etc/default/useradd, or 100 by
default.
|
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
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 -g option. The default is for the user to belong only to the initial group.
|