[Pkg-shadow-devel] Bug#647308: passwd: groupmod modifies users, not just groups

Marc Lehmann debian-reportbug at plan9.de
Tue Nov 1 19:28:37 UTC 2011

Package: passwd
Version: 1:
Severity: normal

groupmod is documented to modify a group definition, but I found it also modifies users:

   rain /home# grep dustfi /etc/passwd
   rain /home# groupmod -g 6455 sf-dustfinger
   rain /home# grep dustfi /etc/passwd

this is unexpected, as unlike usermod's -g, it doesn't change files inside
the users home directory, there is no documented option to switch this
behaviour off, and very problematic, imho, this is completely undocumented
(passwd isn't even mentioned in the manpage under files for example).
it's also inconsistent to usermod -g, which does not update the group

I don't think this behaviour makes sense - it means there is no command
to change a groups gid only (i.e. actually modifiy the group definition,
as opposed to the users groups), making programmatic changes hard, but it
might be hard to change this due to backward compatibility concerns.

It would be nice if groupmod had a switch to actually make it modify the
group definition only, and not tinker with the passwd file in unexpected

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages passwd depends on:
ii  debianutils           3.4                Miscellaneous utilities specific t
hi  libc6                 2.11.2-10          Embedded GNU C Library: Shared lib
ii  libpam-modules        1.1.1-6.1+squeeze1 Pluggable Authentication Modules f
ii  libpam0g              1.1.1-6.1+squeeze1 Pluggable Authentication Modules l
ii  libselinux1           2.0.96-1           SELinux runtime shared libraries

passwd recommends no packages.

passwd suggests no packages.

-- debconf information:
  passwd/selection-path: simple
  passwd/stop-ppp: true
  passwd/user-password: (password omitted)
  passwd/shadow: true
  passwd/root-password: (password omitted)
  passwd/user-password-again: (password omitted)
  passwd/make-user: true
  passwd/md5: false
  passwd/install-problem: true
  passwd/retry-ppp: true
  passwd/root-password-again: (password omitted)
  passwd/user-password-crypted: (password omitted)
  passwd/root-password-crypted: (password omitted)

More information about the Pkg-shadow-devel mailing list