users-admin: create new user with dot/period fails

Bug #677929 reported by Tim D
This bug affects 3 people
Affects Status Importance Assigned to Milestone
adduser (Ubuntu)
gnome-system-tools (Ubuntu)
ubiquity (Ubuntu)
Colin Watson

Bug Description

Binary package hint: gnome-system-tools

Add button -> Create New User dialog:

   dialog claims to accept the special character "." dot in Short Names (as well "-" hyphen and "_" underscore)

  attempting to create a user with a "." dot results in the error: "The configuration could not be saved\n You are not allowed to modify the system configuration."

Using an "_" underscore or "-" hyphen works as expected.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-system-tools 2.30.0-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-24.39-generic
Uname: Linux 2.6.32-24-generic i686
Architecture: i386
Date: Sat Nov 20 14:42:58 2010
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
SourcePackage: gnome-system-tools

Revision history for this message
Tim D (humbletim) wrote :
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Thanks for the report. This is indeed a synchronisation issue between users-admin and adduser, the tool which is responsible for actually creating users. I've filed a bug in Debian so they make adduser allow dots in usernames.

Changed in gnome-system-tools (Ubuntu):
importance: Undecided → Low
status: New → Triaged
affects: gst → adduser
Changed in adduser (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
maxadamo (massimilianoadamo) wrote :

Milan, I don't know if the urgency of this issue is low.
Ubuntu installer is affected as well, and I've read on forums about some novice user not being able to perform the installation as of this issue.
Anyway, as I wrote in my bug report, perhaps the dot should be removed because it's used by the chown command: "chown <file>", as an alternative to the colon.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

What's the exact behavior of the installer? It doesn't use the same code at all, so that's purely a coincidence it it suffers from the same problem.

Don't worry about the importance, though: I'm currently discussing with an adduser developer, and the fact that I set it to Low doesn't mean it won't be considered. Though if you say the installer is affected, we may want to raise priority - but that will be more important when we know what the fix is, and when backporting will have to be considered.

Personnally, I think chown's behavior regarding the dot is silly, since ':' already serves the same purpose (maybe that's a legacy). Anyway, you can always quote the username if you want, and users-admin will ensure chown correctly interprets a username with a dot in it. So I'd rather fix adduser.

Revision history for this message
maxadamo (massimilianoadamo) wrote :

Milan, first of all, as I can see the "adduser" command has a switch "--force-badname" that can be used in this case.
But, if you use this option every kind of strange character will be used. In other words, if you want to use the dot, you need to pass this option only when dot(s) appear in the username, and not for the rest.

Regarding Ubuntu installer, it's not something that happened to me. I just came accross this issue on a usenet newsgroup.
A person was telling that the installation was stuck at the point of creating a user.
After a while he revealed that he was trying to create a user such as "dr.john" (god bless the doctors! :-) )
In other words, you can consider fixing this issue as well, because it's almost the same issue: you need to use --force-badname

Anyway, a man page from BSD says the the dot is there for compatibility with older version of this command:
Perhaps somebody understood that using a dot within a username it was a very common need for the users (in facts, for instance, the dot is very common in the e-mails: name.surname@domain).
In other words I changed my idea and you're right: you can fix the tool and allow *only* dots.... otherwise, do it the other way: allow only "_" and "-"
It's your choice :-)

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Of course, we can pass --force-badname, but if we consider dots as acceptable, adduser should accept them by default.

About chown, there's absolutely no need to change the tool, as long as people that add dots to their usernames and use chown from the commandline know what they are doing. Anyway, if they don't, they'll get an error message, and they'll understand the issue - newbies don't use chown.

Changed in adduser:
status: Unknown → New
Revision history for this message
Colin Watson (cjwatson) wrote :

I already fixed the installer problem in ubiquity 2.5.0 in natty - see bug 555896.

Changed in ubiquity (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.