[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

-----BEGIN PGP SIGNED MESSAGE-----
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_]*\$"
+#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.

regards
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 1.5.36.1                     Debian configuration management sy
ii  passwd      1:4.1.4.2+svn3283-2+squeeze1 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJN+n7xAAoJEJWXIVmJ5BwWjvYIAKJu5Jojf+N4hTijmTr7fsFT
PnbNa5WEpAPWsP38zP+vo/V/CPHP9+tlm0HlspXdWVcG9IsW7FD0CbrI9yQqibSk
9cDpOcNnDSuJhjTrRlKN47m9pDcn0Soj+1GalSS55Th54f2vQEHv/xv60IhGHc0h
A7TATZCrGQdmuLWe/vA5fFTgz6obcqydExStceq1WhfLdUfn1c/nMkrqKRuxD4zA
bUj0v/ZBADxIwv+reFMBt22JD/RbBp4zYbqMPvvRuC9zbGXKSJoasPmKgbd+nN9l
+DBy/hD74gOFz9VUw9bRdt2XTWIzuwPZ4lWq1vvsiDHOgZkdUSpnX51j4H+5AGY=
=kxu5
-----END PGP SIGNATURE-----





More information about the Adduser-devel mailing list