From 718f2c9aee0c84f1b84ccf2205165848ec643ef8 Mon Sep 17 00:00:00 2001
From: Bertrand Neron <bneron@pasteur.fr>
Date: Wed, 7 Sep 2022 09:14:17 +0200
Subject: [PATCH] improve add user section

---
 source/Installation/linux_admin.rst | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/source/Installation/linux_admin.rst b/source/Installation/linux_admin.rst
index ba0ad24..d53bd44 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.
 
-- 
GitLab