creating new user account silently fails when UID is already used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GST |
Fix Released
|
Undecided
|
Unassigned | ||
gnome-system-tools (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
As a system administrator, if you try to create a new account, using the graphical utility (System-
The problems, as I see them, currently are:
1. The utility allows you to set the user id to a value that is already in use without giving a warning
2. The utility shows you a list of users that is not a real reflection of /etc/passwd
How to reproduce it:
1. Inspect /etc/passwd and look for an existing user account. Take note of its user id (usually 1001 would work)
2. Open the Users and Groups tool, create a new user and in the Advanced tab, set the user ID to this number (1001)
3. See how the new user is shown in the list of users
4. Close the Users and Groups tool
5. Open the users and Groups tool
6. Verify that the new user does not exist.
Tried it in Ubuntu-9.04 (Jaunty)
Changed in gnome-system-tools (Ubuntu): | |
assignee: | nobody → Milan Bouchet-Valat (nalimilan) |
summary: |
- create new user account silently fails + creating new user account silently fails when UID is already used |
Changed in gnome-system-tools (Ubuntu): | |
status: | Triaged → Fix Released |
status: | Fix Released → Fix Committed |
Also, if you add a user and then delete it, you can never add it back again.
How to reproduce it.
1. Create a new user, and close the Users and Groups utility
username: test
userid: 1030
Log out from your admin account, and log in with your test account, just to check that everything works fine.
Log out from your test account and log back in as an admin.
2. Delete the test account with the Users and Groups utility, and try to create a 'test' user again, if you want you can close and open the Users and Groups utility again.
It tells you that you cannot add a 'test' user because it already exists.
3. Just to recheck that this is a bug.
The home folder for this user is still there, which may prevent us from creating a user with this name, so we delete it:
sudo rm -rf /home/test
Also we check if /etc/passwd refers to this account:
grep -c test /etc/passwd
0
No traces left from the 'test' user (or so it seems), however, the Users and Groups utility still doesn't allow us to create this account 'because it already exists'
Current problems with this utility:
I cannot fix a mistake:
What if I made a mistake and want to bring this user back to life?
The utility does not help me get rid of all files referenced or referring to this account:
What if I really want to create a new, fresh account with this same username/userid combination?