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.
This commit is contained in:
Pierre Labastie 2022-01-04 17:53:09 +01:00
parent 7f13657de1
commit 2b3f5219bc

View File

@ -188,6 +188,7 @@ make -C man install-man</userinput></screen>
<para>Second, to change the default parameters, the file <para>Second, to change the default parameters, the file
<filename>/etc/default/useradd</filename> needs to be created and taylored <filename>/etc/default/useradd</filename> needs to be created and taylored
to suit your particular needs. Create it with:</para> to suit your particular needs. Create it with:</para>
<screen><userinput>mkdir -p /etc/default <screen><userinput>mkdir -p /etc/default
useradd -D --gid 999</userinput></screen> useradd -D --gid 999</userinput></screen>
@ -198,15 +199,20 @@ useradd -D --gid 999</userinput></screen>
<term><parameter>GROUP=999</parameter></term> <term><parameter>GROUP=999</parameter></term>
<listitem> <listitem>
<para>This parameter sets the beginning of the group numbers used in <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 the <filename>/etc/group</filename> file. The particular value 999
that <command>useradd</command> will never reuse a UID or GID. If the 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 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 available number after this. Note also that if you don't have a
1000 on your system the first time you use <command>useradd</command> 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 without the <parameter>-g</parameter> parameter, you'll get a message
displayed on the terminal that says: displayed on the terminal that says:
<computeroutput>useradd: unknown GID 1000</computeroutput>. You may <computeroutput>useradd: unknown GID 999</computeroutput>, although
disregard this message and group number 1000 will be used.</para> the account is correctly created. That is
why we have earlier created the group <parameter>users</parameter>
with this group ID.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>