[Adduser-devel] Bug#630750: default NAME_REGEX value in /etc/adduser.conf is incorrect

Georgios M. Zarkadas georgios.zarkadas at gmail.com
Thu Jun 16 22:09:13 UTC 2011

Package: adduser
Version: 3.112+nmu2
Severity: normal
Tags: patch

Hash: SHA1

The default value of variable NAME_REGEX shipped within the package's file 
/usr/share/adduser/adduser.conf (which is copied upon installation to
etc/adduser.conf) is incorrect.

current value / should-be value (the patch - append "?$" to it):

- --- adduser.conf	2011-06-17 00:51:05.718593580 +0300
+++ adduser.conf	2011-06-17 00:51:32.282093072 +0300
@@ -82,4 +82,4 @@
 # check user and group names also against this regular expression.
- -#NAME_REGEX="^[a-z][-a-z0-9_]*\$"

The problem realised when tried to install hal (which installs user haldaemon)
with the regex enabled and it failed to install with the following message:

- ---------------
Γίνεται εγκατάσταση hal (0.5.14-3) ...
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable.  Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
dpkg: σφάλμα στην επεξεργασία του hal (--configure):
 η υποδιεργασία installed post-installation script επέστρεψε κατάσταση λάθους 1 
- ---------------

After checking the postinst script of hal package I didn't found anything 
suspicious in its adduser invocation, nor on the tried out username (haldaemon)
so I started to study the adduser source code. 

Seeing the 'checkname' routine and the initial test expression, I finally came
up with the patch which was tried and hal installation succeeded.

George Zarkadas

- -- System Information:
Debian Release: 6.0.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable'), (450, 'testing-proposed-updates'), (450, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=el_GR.utf8, LC_CTYPE=el_GR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages adduser depends on:
ii  debconf [de                     Debian configuration management sy
ii  passwd      1: change and administer password and
ii  perl-base   5.10.1-17                    minimal Perl system

adduser recommends no packages.

Versions of packages adduser suggests:
ii  liblocale-gettext-perl        1.05-6     Using libc functions for internati
ii  perl-modules                  5.10.1-17  Core Perl modules

- -- debconf information:
  adduser/homedir-permission: true

Version: GnuPG v1.4.10 (GNU/Linux)


More information about the Adduser-devel mailing list