[Pkg-shadow-commits] r1178 - in trunk/debian: . patches
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sun Apr 15 14:57:02 UTC 2007
Author: nekral-guest
Date: 2007-04-15 14:57:02 +0000 (Sun, 15 Apr 2007)
New Revision: 1178
Added:
trunk/debian/patches/407_adduser_disable_PUG_with-n
Modified:
trunk/debian/changelog
trunk/debian/patches/series
trunk/debian/useradd.default
Log:
Fix 416835:
* Add a -n option to disable the creation of primary user groups
* Document the current behavior and the -n option in the useradd manpage
* Update the /etc/default/useradd comments about GROUP and mentions -n
and -g.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-04-15 13:41:42 UTC (rev 1177)
+++ trunk/debian/changelog 2007-04-15 14:57:02 UTC (rev 1178)
@@ -15,6 +15,8 @@
- passwd: manpages (<=1.15-2), manpages-pl (<= 20020406-1)
- login: shadow-login, shadow-passwd, shellutils (<< 2.0-2), manpages-pl (<= 20020406-1)
- Remove unneeded Build-Depends: bzip2, file, texinfo, libpam-runtime
+ - /etc/default/useradd: Mentions the creation of primary user groups is
+ neither -n nor -g are specified. See also 407_adduser_disable_PUG_with-n
* Upstream bugs not yet fixed in upstream releases or CVS:
- 493_pwck_no_SHADOWPWD: SHADOWPWD no more exist.
pwck do not detect missing users in /etc/shadow.
@@ -25,6 +27,8 @@
Thanks to Dean Gaudet for the patch and report. Closes: #414542
- 497_newgrp_primary_group: Do not request a password when a user uses
newgrp to switch to her primary group. Closes: #396691
+ - 407_adduser_disable_PUG_with-n: Add option -n to useradd to disable the
+ creation of primary user groups. Closes: #416835
* Upstream bugs fixed in upstream releases or CVS:
- 497_non_numerical_identifier moved as 397_non_numerical_identifier
because upstream applied it
Added: trunk/debian/patches/407_adduser_disable_PUG_with-n
===================================================================
--- trunk/debian/patches/407_adduser_disable_PUG_with-n 2007-04-15 13:41:42 UTC (rev 1177)
+++ trunk/debian/patches/407_adduser_disable_PUG_with-n 2007-04-15 14:57:02 UTC (rev 1178)
@@ -0,0 +1,78 @@
+Goal: Document the creation of primary user groups.
+ Add the -n option to disable this behavior.
+
+Fixes: #416835
+
+Status wrt upstream: not reported yet.
+
+Notes:
+ * The nflg variable already existed, but was never set.
+
+ * This could also be done by just specifying that the -g's argument is
+ optional. As -n is already implemented in RedHat, it may be better
+ for compatibility to keep it.
+
+ * The debian/useradd.default file had to be updated to reflect these
+ changes.
+
+Index: shadow-4.0.18.1/man/useradd.8.xml
+===================================================================
+--- shadow-4.0.18.1.orig/man/useradd.8.xml 2007-04-15 16:16:36.000000000 +0200
++++ shadow-4.0.18.1/man/useradd.8.xml 2007-04-15 16:49:17.000000000 +0200
+@@ -134,8 +134,7 @@
+ <para>
+ The group name or number of the user's initial login group. The
+ group name must exist. A group number must refer to an already
+- existing group. The default group number is 1 or whatever is
+- specified in <filename>/etc/default/useradd</filename>.
++ existing group.
+ </para>
+ </listitem>
+ </varlistentry>
+@@ -184,6 +183,23 @@
+ </varlistentry>
+ <varlistentry>
+ <term>
++ <option>-n</option>
++ </term>
++ <listitem>
++ <para>
++ A group having the same name as the user being added to the
++ system will be created by default (when <option>-g</option> is
++ not specified). This option will turn off this behavior. When
++ this option is used, users by default will be placed in
++ whatever group is specified in the
++ <replaceable>GROUP</replaceable> variable of
++ <filename>/etc/default/useradd</filename>. If no default group
++ is defined, group 100 (users) will be used.
++ </para>
++ </listitem>
++ </varlistentry>
++ <varlistentry>
++ <term>
+ <option>-K</option>, <option>--key</option>
+ <replaceable>KEY</replaceable>=<replaceable>VALUE</replaceable>
+ </term>
+Index: shadow-4.0.18.1/src/useradd.c
+===================================================================
+--- shadow-4.0.18.1.orig/src/useradd.c 2007-04-15 16:15:22.000000000 +0200
++++ shadow-4.0.18.1/src/useradd.c 2007-04-15 16:16:11.000000000 +0200
+@@ -1036,7 +1036,7 @@
+ {NULL, 0, NULL, '\0'}
+ };
+ while ((c =
+- getopt_long (argc, argv, "b:c:d:De:f:g:G:k:O:K:mMop:rs:u:",
++ getopt_long (argc, argv, "b:c:d:De:f:g:G:k:O:K:mMnop:rs:u:",
+ long_options, NULL)) != -1) {
+ switch (c) {
+ case 'b':
+@@ -1177,6 +1177,9 @@
+ case 'm':
+ mflg++;
+ break;
++ case 'n':
++ nflg++;
++ break;
+ case 'o':
+ oflg++;
+ break;
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2007-04-15 13:41:42 UTC (rev 1177)
+++ trunk/debian/patches/series 2007-04-15 14:57:02 UTC (rev 1178)
@@ -52,3 +52,4 @@
505_useradd_recommend_adduser
406_vipw_resume_properly
497_newgrp_primary_group
+407_adduser_disable_PUG_with-n
Modified: trunk/debian/useradd.default
===================================================================
--- trunk/debian/useradd.default 2007-04-15 13:41:42 UTC (rev 1177)
+++ trunk/debian/useradd.default 2007-04-15 14:57:02 UTC (rev 1178)
@@ -8,12 +8,12 @@
SHELL=/bin/sh
#
# The default group for users
-# 1000=users on Debian systems
+# 100=users on Debian systems
# same than USERS_GID in adduser
-# Please be aware that Debian's adduser defaults to "user groups"
-# which means that one group is created for each user
-# There is no way to achieve this with useradd which must remains a low
-# level utility
+# This argument is used when the -n flag is specified.
+# The default behavior (when -n and -g are not specified) is to create a
+# primary user group with the same name as the user being added to the
+# system.
# GROUP=100
#
# The default home directory. Same than DHOME for adduser
More information about the Pkg-shadow-commits
mailing list