Package: adduser
Version: 3.112

I don't think there's a reason not to allow usernames to contain dots
(.), as they are also allowed to contain underscores (_) and dashes (-).
useradd accepts this.

Attached is a patch that makes dots be allowed just as other special
chars. One could also add the point in this line in /etc/adduser.conf:
#NAME_REGEX="^[a-z][-a-z0-9_]*\$"
but providing a patch for that makes the change harder to perform! ;-)


This fix would be appreciated for the gnome-system-tools, because
currently users-admin says dots are accepted, and this is false on
Debian. Saying dots are not allowed would be an issue because other
platforms allow for them, which means Debian should carry a specific
patch...

Original report in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/gnome-system-tools/+bug/677929
--- /home/milan/Bureau/AdduserCommon.pm	2010-11-21 12:45:31.000000000 +0100
+++ /usr/share/perl5/Debian/AdduserCommon.pm	2010-11-21 12:44:51.697032827 +0100
@@ -207,8 +207,8 @@
   $configref->{"dir_mode"} = "0755";
   $configref->{"setgid_home"} = "no";
   $configref->{"no_del_paths"} = "^/$ ^/lost+found/.* ^/media/.* ^/mnt/.* ^/etc/.* ^/bin/.* ^/boot/.* ^/dev/.* ^/lib/.* ^/proc/.* ^/root/.* ^/sbin/.* ^/tmp/.* ^/sys/.* ^/srv/.* ^/opt/.* ^/initrd/.* ^/usr/.* ^/var/.*";
-  $configref->{"name_regex"} = "^[a-z][-a-z0-9_]*\$";
-  $configref->{"name_regex_system"} = "^[A-Za-z][-A-Za-z0-9_]*\$";
+  $configref->{"name_regex"} = "^[a-z][-a-z0-9_.]*\$";
+  $configref->{"name_regex_system"} = "^[A-Za-z][-A-Za-z0-9_.]*\$";
   $configref->{"exclude_fstypes"} = "(proc|sysfs|usbfs|devpts|tmpfs)";
   $configref->{"skel_ignore_regex"} = "dpkg-(old|new|dist)\$";
   $configref->{"extra_groups"} = "dialout cdrom floppy audio video plugdev users";

Reply via email to