useradd
creates a new user or updates default new user information. $ useradd -s /bin/bash -m rene
-s
specifies the default shell for the new user. If not specified, it takes the value of SHELL
variable in /etc/default/useradd
. -m
creates the new user's home directory if it does not exist. usermod
can be used to add an already created user to an already created group: $ usermod -a -G sudo rene
/etc/sudoers
is configured to allow users in the sudo group to execute sudo commands. SKEL
variable in /etc/default/useradd
(default: /etc/skel/*
). -k /path/to/directory
. -k /dev/null
. useradd -m rene passwd rene