From 2b3f5219bc51250337c78571efe69abdc0ffc9e0 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 4 Jan 2022 17:53:09 +0100 Subject: Reword explanation of GROUP parameter in /etc/default/useradd Tell that 999 comes from the --gid parameter, and that we already have a group "users" with this gid to prevent messages when first using useradd. --- chapter08/shadow.xml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'chapter08') diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index b6587e0b1..810e77969 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -188,6 +188,7 @@ make -C man install-man Second, to change the default parameters, the file /etc/default/useradd needs to be created and taylored to suit your particular needs. Create it with: + mkdir -p /etc/default useradd -D --gid 999 @@ -198,15 +199,20 @@ useradd -D --gid 999 GROUP=999 This parameter sets the beginning of the group numbers used in - the /etc/group file. You can modify it to anything you desire. Note - that useradd will never reuse a UID or GID. If the + the /etc/group file. The particular value 999 + comes from the --gid parameter above. + You can modify it to anything you desire. Note that + useradd will never reuse a UID or GID. If the number identified in this parameter is used, it will use the next - available number after this. Note also that if you don't have a group - 1000 on your system the first time you use useradd + available number after this. Note also that if you don't have a + group with an ID equal to this number on your system the first + time you use useradd without the -g parameter, you'll get a message displayed on the terminal that says: - useradd: unknown GID 1000. You may - disregard this message and group number 1000 will be used. + useradd: unknown GID 999, although + the account is correctly created. That is + why we have earlier created the group users + with this group ID. -- cgit v1.2.3-54-g00ecf