Ignore:
Timestamp:
01/04/2022 11:38:18 AM (2 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
2b3f5219
Parents:
d21ec2f
git-author:
Pierre Labastie <pierre.labastie@…> (01/04/2022 11:34:59 AM)
git-committer:
Pierre Labastie <pierre.labastie@…> (01/04/2022 11:38:18 AM)
Message:

shadow: move /etc/default/useradd creation to "Configuration"

This is needed so that /etc/default/useradd is not removed by package
managers when rebuilding shadow in BLFS. Change the explanations in
the text accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/shadow.xml

    rd21ec2f r7f13657d  
    144144
    145145    <screen><userinput remap="install">make exec_prefix=/usr install
    146 make -C man install-man
    147 mkdir -p /etc/default
    148 useradd -D --gid 999</userinput></screen>
     146make -C man install-man</userinput></screen>
    149147
    150148  </sect2>
     
    175173<screen><userinput>grpconv</userinput></screen>
    176174
    177     <para>Shadow's stock configuration for the <command>useradd</command>
     175    <para>Shadow's default configuration for the <command>useradd</command>
    178176    utility has a few caveats that need some explanation. First, the default
    179177    action for the <command>useradd</command> utility is to create the user and
     
    182180    parameters to <command>useradd</command>, each user will be a member of a
    183181    unique group on the system. If this behavior is undesirable, you'll need
    184     to pass the <parameter>-g</parameter> parameter to
    185     <command>useradd</command>. The default parameters are stored in the
    186     <filename>/etc/default/useradd</filename> file. You may need to modify two
    187     parameters in this file to suit your particular needs.</para>
     182    to pass one of the <parameter>-g</parameter> or <parameter>-N</parameter>
     183    parameter to <command>useradd</command> or to change the setting of
     184    <parameter>USERGROUPS_ENAB</parameter> in
     185    <filename>/etc/login.defs</filename>. See <filename>useradd(8)</filename>
     186    for more information.</para>
     187
     188    <para>Second, to change the default parameters, the file
     189    <filename>/etc/default/useradd</filename> needs to be created and taylored
     190    to suit your particular needs. Create it with:</para>
     191<screen><userinput>mkdir -p /etc/default
     192useradd -D --gid 999</userinput></screen>
    188193
    189194    <variablelist>
     
    191196
    192197      <varlistentry>
    193         <term><parameter>GROUP=1000</parameter></term>
     198        <term><parameter>GROUP=999</parameter></term>
    194199        <listitem>
    195200          <para>This parameter sets the beginning of the group numbers used in
     
    216221          command:</para>
    217222
    218 <screen><userinput>sed -i 's/yes/no/' /etc/default/useradd</userinput></screen>
     223<screen><userinput>sed -i '/MAIL/s/yes/no/' /etc/default/useradd</userinput></screen>
    219224        </listitem>
    220225      </varlistentry>
    221226
    222227    </variablelist>
    223 
    224228
    225229  </sect2>
Note: See TracChangeset for help on using the changeset viewer.