Bug#416835: (forw) [Pkg-shadow-devel] Bug#416835: /usr/sbin/useradd: contrary to documentation, useradd creates per-user groups

Christian Perrier bubulle at kheops.frmug.org
Sat Mar 31 05:17:17 UTC 2007


Any thoughts by others about this bug that was reported in Debian?

Please note that the "according to /etc/default/useradd" refers to the
default file we provide in Debian (attached), which is different from
the default file provided by upstream shadow.

----- Forwarded message from river at hemlock.knams.wikimedia.org -----

From: river at hemlock.knams.wikimedia.org
To: Debian Bug Tracking System <submit at bugs.debian.org>
X-Mailer: reportbug 3.31
Date: Fri, 30 Mar 2007 16:16:23 +0000
Subject: [Pkg-shadow-devel] Bug#416835: /usr/sbin/useradd: contrary to
	documentation, useradd creates per-user groups
Reply-To: river at hemlock.knams.wikimedia.org, 416835 at bugs.debian.org
X-CRM114-Status: UNSURE (3.8607) This message is 'unsure'; please train it! 

Package: passwd
Version: 1:4.0.18.1-7
Severity: normal
File: /usr/sbin/useradd

according to /etc/default/useradd, useradd(8) is not capable of creating
per-user groups.  its manual page does not mention that it can or will
do so.  the manual page also says that when no group is specified, the
default group is "1".  despite this, when useradd is invoked without -g,
per-user groups are created:

127/root at hemlock:~>id testuser
id: testuser: No such user
1/root at hemlock:~>grep testuser /etc/group
1/root at hemlock:~>useradd testuser
0/root at hemlock:~>id testuser
uid=1144(testuser) gid=1144(testuser) groups=1144(testuser)
0/root at hemlock:~>grep testuser /etc/group
testuser:x:1144:
0/root at hemlock:~>

"useradd -g users" will correctly add the user to the "users" group and
not create a per-user group. 

either useradd should be changed to not create per-user groups, or the
documentation should be updated to say that it will do so.  (the former
behaviour seems to make more sense, it's very unexpected that a
low-level utility like useradd will do such things.)

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.4-hemlock6-twincest
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)

Versions of packages passwd depends on:
ii  debianutils                 2.17         Miscellaneous utilities specific t
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libpam-modules              0.79-4       Pluggable Authentication Modules f
ii  libpam0g                    0.79-4       Pluggable Authentication Modules l
ii  libselinux1                 1.32-3       SELinux shared libraries
ii  login                       1:4.0.18.1-7 system login tools

passwd recommends no packages.

-- debconf information:
  passwd/password-mismatch:
  passwd/username:
  passwd/password-empty:
  passwd/make-user: true
  passwd/title:
  passwd/user-uid:
  passwd/shadow: true
  passwd/username-bad:
  passwd/user-fullname:


_______________________________________________
Pkg-shadow-devel mailing list
Pkg-shadow-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-devel



 ** CRM114 Whitelisted by: owner at bugs.debian.org **

----- End forwarded message -----


-------------- next part --------------
# Default values for useradd(8)
#
# The SHELL variable specifies the default login shell on your
# system.
# Similar to DHSELL in adduser. We however use "sh" here because
# useradd being a low level utility should rather be as widely opened
# as possible
SHELL=/bin/sh
#
# The default group for users
# 1000=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
# GROUP=100
#
# The default home directory. Same than DHOME for adduser
# HOME=/home
#
# The number of days after a password expires until the account 
# is permanently disabled
# INACTIVE=-1
#
# The default expire date
# EXPIRE=
#
# The SKEL variable specifies the directory containing "skeletal" user
# files; in other words, files such as a sample .profile that will be
# copied to the new user's home directory when it is created.
# SKEL=/etc/skel
#
# Defines whether the mail spool should be created while
# creating the account
# CREATE_MAIL_SPOOL=yes



More information about the Pkg-shadow-devel mailing list