diff --git a/source/Installation/linux_admin.rst b/source/Installation/linux_admin.rst index ba0ad242f64cac6c190be63394325b7b05efc6a3..d53bd443466215d9b259f00c90cd93e5f0f8f4ba 100644 --- a/source/Installation/linux_admin.rst +++ b/source/Installation/linux_admin.rst @@ -142,9 +142,28 @@ User and Group management Create a new user ----------------- +The command is `useradd` and the syntax is `useradd [options] username` + +.. code-block:: shell + + sudo useradd -u <UID> -g <primary group> -G <group1,group2,...> -m --shell /bin/bash <username> + +will create a user with + +* a specific uid `-u` +* a specific primary group `-g` +* belonging to the secondary groups `-G` (groups are separated by comma without space surrounding comma) +* create a home directory `-m` (/home/<username>) +* with a specific shell `--shell` + +But if you can let the system choose the uid, primary group, ... +So the command line could be simpler. + .. code-block:: shell - sudo useradd -u UID -g <primary group> -G <group1,group2,...> -m --shell /bin/bash + sudo useradd -m --shell /bin/bash <username> + +Will create a user with a home and bash as shell Only root can perform this command.