[Pkg-shadow-devel] Bug#508785: gpasswd truncates usernames to 31 characters

Martin v. Wittich martin.von.wittich at iserv.eu
Mon Dec 15 11:44:07 UTC 2008

Package: passwd
Version: 1:
Severity: normal

useradd allows for user names up to 32 characters, but gpasswd -M
truncates user names that are 32 characters long to 31 characters.
Here's a script to reproduce:


# create user and group
# username length: 4*8 = 32 characters
groupadd testgroup
useradd useruseruseruseruseruseruseruser

# this will print: 'gpasswd: unknown user useruseruseruseruseruseruseruse'
gpasswd -M useruseruseruseruseruseruseruser testgroup

# clean up
groupdel testgroup
userdel useruseruseruseruseruseruseruser

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-xen-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)

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

passwd recommends no packages.

-- debconf information:
* passwd/make-user: false
  passwd/md5: false
* passwd/shadow: true

More information about the Pkg-shadow-devel mailing list