* NEWS, src/useradd.c, man/useradd.8.xml: Added options

-user-group (-U, Uflg) and --no-user-group (-N, Nflg) to replace
  nflg.
* man/login.defs.d/USERGROUPS_ENAB.xml: useradd now also uses
  USERGROUPS_ENAB.
This commit is contained in:
nekral-guest
2008-02-25 21:03:46 +00:00
parent 2a5c015cd1
commit 93e2f66a60
5 changed files with 104 additions and 8 deletions

View File

@@ -7,8 +7,10 @@
the same as gid, and username is the same as the primary group name.
<para>
</para>
If set to <replaceable>yes</replaceable>, userdel will remove the
user's group if it contains no more members.
If set to <replaceable>yes</replaceable>, <command>userdel</command>
will remove the user's group if it contains no more members, and
<command>useradd</command> will create by default a group with the
name of the user.
</para>
</listitem>
</varlistentry>

View File

@@ -7,8 +7,11 @@
<!ENTITY PASS_MAX_DAYS SYSTEM "login.defs.d/PASS_MAX_DAYS.xml">
<!ENTITY PASS_MIN_DAYS SYSTEM "login.defs.d/PASS_MIN_DAYS.xml">
<!ENTITY PASS_WARN_AGE SYSTEM "login.defs.d/PASS_WARN_AGE.xml">
<!ENTITY SYS_GID_MAX SYSTEM "login.defs.d/SYS_GID_MAX.xml">
<!ENTITY SYS_UID_MAX SYSTEM "login.defs.d/SYS_UID_MAX.xml">
<!ENTITY UID_MAX SYSTEM "login.defs.d/UID_MAX.xml">
<!ENTITY UMASK SYSTEM "login.defs.d/UMASK.xml">
<!ENTITY USERGROUPS_ENAB SYSTEM "login.defs.d/USERGROUPS_ENAB.xml">
]>
<refentry id='useradd.8'>
<!-- $Id$ -->
@@ -238,6 +241,25 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-N</option>, <option>--no-user-group</option>
</term>
<listitem>
<para>
Do not create a group with the same name as the user, but
add the user to the group specified by the <option>-g</option>
option or by the GROUP variable in
<filename>/etc/default/useradd</filename>.
</para>
<para>
The default behavior (if the <option>-g</option>,
<option>-N</option>, and <option>-U</option> options are not
specified) is defined by the <option>USERGROUPS_ENAB</option>
variable in <filename>login.defs</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-o</option>, <option>--non-unique</option>
@@ -287,6 +309,23 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-U</option>, <option>--user-group</option>
</term>
<listitem>
<para>
Create a group with the same name as the user, and
add the user to this group.
</para>
<para>
The default behavior (if the <option>-g</option>,
<option>-N</option>, and <option>-U</option> options are not
specified) is defined by the <option>USERGROUPS_ENAB</option>
variable in <filename>login.defs</filename>.
</para>
</listitem>
</varlistentry>
</variablelist>
<refsect2 id='changing_the_default_values'>
@@ -405,8 +444,11 @@
&PASS_MAX_DAYS;
&PASS_MIN_DAYS;
&PASS_WARN_AGE;
&SYS_GID_MAX; <!-- documents also SYS_GID_MIN -->
&SYS_UID_MAX; <!-- documents also SYS_UID_MIN -->
&UID_MAX; <!-- documents also UID_MIN -->
&UMASK;
&USERGROUPS_ENAB;
</variablelist>
</refsect1>