aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08
diff options
context:
space:
mode:
authorPierre Labastie <pierre.labastie@neuf.fr>2022-01-04 17:53:09 +0100
committerPierre Labastie <pierre.labastie@neuf.fr>2022-01-04 17:53:09 +0100
commit2b3f5219bc51250337c78571efe69abdc0ffc9e0 (patch)
tree6cbb9fe8735ddf3e594f5ba0639cc5975659ebe0 /chapter08
parent7f13657de1ca21bcd94830df21a5b48efbd89e97 (diff)
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.
Diffstat (limited to 'chapter08')
-rw-r--r--chapter08/shadow.xml18
1 files changed, 12 insertions, 6 deletions
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</userinput></screen>
<para>Second, to change the default parameters, the file
<filename>/etc/default/useradd</filename> needs to be created and taylored
to suit your particular needs. Create it with:</para>
+
<screen><userinput>mkdir -p /etc/default
useradd -D --gid 999</userinput></screen>
@@ -198,15 +199,20 @@ useradd -D --gid 999</userinput></screen>
<term><parameter>GROUP=999</parameter></term>
<listitem>
<para>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 <command>useradd</command> will never reuse a UID or GID. If the
+ the <filename>/etc/group</filename> file. The particular value 999
+ comes from the <parameter>--gid</parameter> parameter above.
+ You can modify it to anything you desire. Note that
+ <command>useradd</command> 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 <command>useradd</command>
+ 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 <command>useradd</command>
without the <parameter>-g</parameter> parameter, you'll get a message
displayed on the terminal that says:
- <computeroutput>useradd: unknown GID 1000</computeroutput>. You may
- disregard this message and group number 1000 will be used.</para>
+ <computeroutput>useradd: unknown GID 999</computeroutput>, although
+ the account is correctly created. That is
+ why we have earlier created the group <parameter>users</parameter>
+ with this group ID.</para>
</listitem>
</varlistentry>
<varlistentry>