mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 14:24:48 +00:00
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.
This commit is contained in:
parent
d21ec2fcbb
commit
7f13657de1
@ -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,23 +172,30 @@ 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
|
||||
@ -215,13 +220,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">
|
||||
|
Loading…
Reference in New Issue
Block a user