- Timestamp:
- 01/05/2022 04:45:10 AM (2 years ago)
- Branches:
- multilib
- Children:
- af974a9c
- Parents:
- bb2febd4 (diff), b029aa8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/shadow.xml
rbb2febd4 r43a5dd6 144 144 145 145 <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> 146 make -C man install-man</userinput></screen> 149 147 150 148 </sect2> … … 175 173 <screen><userinput>grpconv</userinput></screen> 176 174 177 <para>Shadow's stockconfiguration for the <command>useradd</command>175 <para>Shadow's default configuration for the <command>useradd</command> 178 176 utility has a few caveats that need some explanation. First, the default 179 177 action for the <command>useradd</command> utility is to create the user and … … 182 180 parameters to <command>useradd</command>, each user will be a member of a 183 181 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 192 <screen><userinput>mkdir -p /etc/default 193 useradd -D --gid 999</userinput></screen> 188 194 189 195 <variablelist> … … 191 197 192 198 <varlistentry> 193 <term><parameter>GROUP= 1000</parameter></term>199 <term><parameter>GROUP=999</parameter></term> 194 200 <listitem> 195 201 <para>This parameter sets the beginning of the group numbers used in 196 the /etc/group file. You can modify it to anything you desire. Note 197 that <command>useradd</command> will never reuse a UID or GID. If the 198 number identified in this parameter is used, it will use the next 199 available number after this. Note also that if you don't have a group 200 1000 on your system the first time you use <command>useradd</command> 201 without the <parameter>-g</parameter> parameter, you'll get a message 202 displayed on the terminal that says: 203 <computeroutput>useradd: unknown GID 1000</computeroutput>. You may 204 disregard this message and group number 1000 will be used.</para> 202 the <filename>/etc/group</filename> file. The particular value 999 203 comes from the <parameter>--gid</parameter> parameter above. You can 204 modify it to anything you desire. 205 206 Note that <command>useradd</command> will never reuse a UID or GID. 207 If the number identified in this parameter is used, it will use the 208 next available number. Note also that if you don't have a group with 209 an ID equal to this number on your system the first time you use 210 <command>useradd</command> without the <parameter>-g</parameter> 211 parameter, you will get a message displayed on the terminal that 212 says: <computeroutput>useradd: unknown GID 999</computeroutput>, 213 although the account is correctly created. That is why we have 214 created the group <systemitem class="groupname">users</systemitem> 215 with this group ID in <xref linkend='ch-tools-createfiles'/>.</para> 216 205 217 </listitem> 206 218 </varlistentry> … … 216 228 command:</para> 217 229 218 <screen><userinput>sed -i ' s/yes/no/' /etc/default/useradd</userinput></screen>230 <screen><userinput>sed -i '/MAIL/s/yes/no/' /etc/default/useradd</userinput></screen> 219 231 </listitem> 220 232 </varlistentry> 221 233 222 234 </variablelist> 223 224 235 225 236 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.