[Adduser-devel] Bug#604242: Bug#604242: [patch] Allow dots in username by default

Milan Bouchet-Valat nalimilan at club.fr
Sun Nov 21 18:14:36 UTC 2010

Le dimanche 21 novembre 2010 à 17:42 +0000, Stephen Gran a écrit :
> -  $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_.]*\$";
> That's a regex, so a bare . is almost certainly not what you want there.
Indeed, kind of silly. Of course, we need to escape it...

> Why does users-admin use adduser instead of useradd?  It's not that
> it shouldn't, but adduser is primarily designed as a policy compliant
> method for maintainers to interface in a policy compliant way with user
> management in maintainer scripts - extending it to be a general purpose
> user management script for all manner of environments isn't what it's
> aimed at, and I'm not convinced it will be a good thing to make it
> general purpose.  I think before changing the naming policy of adduser,
> it does make sense to stop for a moment and check if you're using the
> right tool for the job.
AFAIK, users-admin has always used adduser on Debian systems, I guess
with the idea that it will more likely to what the admin wants, since
settings from /etc/adduser.conf will be used. But this also brings many
issues, because we can never be sure what adduser is going to do, nor if
it will fail (the present bug being a good example).

Anyway, users-admin is being replaced with accounts-dialog in GNOME, so
I'm not going to change the way it works. And accounts-dialog uses
useradd (it was mainly designed for Fedora originally), and I guess
that's what we'll want to keep for Debian too, but that creates other
problems (like: how do you choose where to create home directories? what
if people create accounts using adduser once, and accounts-dialog the

The current bug should also IMHO be fixed for adduser itself,
disregarding the fact that users-admin needs it. I can't find a reason
why dots shouldn't be allowed, and they can be pretty convenient for
some naming conventions (e.g. firstname.lastname)

More information about the Adduser-devel mailing list