This one time, at band camp, Milan Bouchet-Valat said: > 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...
- $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. 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. Cheers, -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : sg...@debian.org | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
signature.asc
Description: Digital signature