Automatic merge of trunk into multilib

This commit is contained in:
Thomas Trepl (Moody) 2022-01-05 05:45:10 +01:00
commit 43a5dd6043

View File

@ -143,9 +143,7 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s
<para>Install the package:</para>
<screen><userinput remap="install">make exec_prefix=/usr install
make -C man install-man
mkdir -p /etc/default
useradd -D --gid 999</userinput></screen>
make -C man install-man</userinput></screen>
</sect2>
@ -174,34 +172,48 @@ useradd -D --gid 999</userinput></screen>
<screen><userinput>grpconv</userinput></screen>
<para>Shadow's stock configuration for the <command>useradd</command>
<para>Shadow's default configuration for the <command>useradd</command>
utility has a few caveats that need some explanation. First, the default
action for the <command>useradd</command> utility is to create the user and
a group of the same name as the user. By default the user ID (UID) and
group ID (GID) numbers will begin with 1000. This means if you don't pass
parameters to <command>useradd</command>, each user will be a member of a
unique group on the system. If this behavior is undesirable, you'll need
to pass the <parameter>-g</parameter> parameter to
<command>useradd</command>. The default parameters are stored in the
<filename>/etc/default/useradd</filename> file. You may need to modify two
parameters in this file to suit your particular needs.</para>
to pass one of the <parameter>-g</parameter> or <parameter>-N</parameter>
parameter to <command>useradd</command> or to change the setting of
<parameter>USERGROUPS_ENAB</parameter> in
<filename>/etc/login.defs</filename>. See <filename>useradd(8)</filename>
for more information.</para>
<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>
<variablelist>
<title><filename>/etc/default/useradd</filename> Parameter Explanations</title>
<varlistentry>
<term><parameter>GROUP=1000</parameter></term>
<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
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>
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>
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. 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 will get a message displayed on the terminal that
says: <computeroutput>useradd: unknown GID 999</computeroutput>,
although the account is correctly created. That is why we have
created the group <systemitem class="groupname">users</systemitem>
with this group ID in <xref linkend='ch-tools-createfiles'/>.</para>
</listitem>
</varlistentry>
<varlistentry>
@ -215,13 +227,12 @@ useradd -D --gid 999</userinput></screen>
created by <command>useradd</command>, issue the following
command:</para>
<screen><userinput>sed -i 's/yes/no/' /etc/default/useradd</userinput></screen>
<screen><userinput>sed -i '/MAIL/s/yes/no/' /etc/default/useradd</userinput></screen>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 role="configuration">