[users-admin] [HARDY] erasing /etc/passwd and /etc/groups when failing to load configuration

Bug #234473 reported by schmeii
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GST
Fix Released
Critical
gnome-system-tools (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
Nominated for Intrepid by Julianno Jungle

Bug Description

Binary package hint: gnome-system-tools

When I started users-admin, the list was empty. I didn't know that this was not normal, so I unlocked the program, added an user and clicked on OK. The result was quite disastrous since /etc/passwd only had the new user. I needed to reinstall Ubuntu (and so all logs are lost, sorry). I think this can be hard to reproduce, but there should be a protection against that (in particulary, the presence of root should be checked before the file is written) to avoid such loss.

A related issue is that the rescue mode don't work in this case (it ask a root passwd) but I'm not even sure this is a bug

(See also lp:187147)

Tags: likely-dup
Revision history for this message
Eduardo Durany Fernández (edurany) wrote :

Confirmed in a new hardy install. This is a very serious bug.

Changed in gnome-system-tools:
status: New → Confirmed
Revision history for this message
Julianno Jungle (juliannojungle) wrote :

The same happened to me in Intrepid, TWICE!
Im brazillian and i have what we know as Cyber Café (its like a place with pcs with internet access and food together, i dont know how to explain better...) and i use Ubuntu Intrepid with LTSP. I have 6 terminals plus the server. I created an html/javascript gui to add new users using the adduser command, creating at the same time a database with their infos and credits (to use the PCs). Every time when i reach about 350-400 users added, the list in users-admin becomes BLANK, and there is the only place where i can change the users password to unsafe words as they want (something like 123456, abcdefg, or wathever unsafe). Im adding them with a default password 123456 and then they use an script that i wrote that gives a gui to safely change the password using passwd, but some users want to use unsafe passwords, and the passwd doesn't allow it.

At Hardy i doesnt saw that blank-list bug, but i was with only about 250-300 users added. I only saw it when i upgraded to intrepid.

Sorry for the very bad english and sorry if i became confusing explaining my problem.

Revision history for this message
Julianno Jungle (juliannojungle) wrote :

I forgot to say, i did exactly the same as schmeii did. When i saw the blank list, tried to add an user, and bang! Everything was messed up. Even the thin clients couldn't be restarted (but i think that it isn't related to this thread). Passwd file was with only the current logged users.

Isnt this bug should be marked as HIGH or CRITICAL?? We cannot add or change any user without having to FORMAT THE PC and reinstalling Ubuntu...

Sorry if here was not the right place to post this, im a very new user of Ubuntu, launchpad etc (about 3 months).

Revision history for this message
schmeii (schmeii) wrote :

To allow unsecure password, you must remove the "obscure" option from the pam_unix line in either /etc/pam.d/passwd or in /etc/pam.d/common-passwd. It doesn't fix the bug still :(

Revision history for this message
Julianno Jungle (juliannojungle) wrote :

Oh, thanks.
Removing the "obscure" option helps a lot on changing password to wathever we want.

Now is just someone with the needed knowledge solve the "blank list on gui" bug. ^^
Well, actually the blank list is not the problem, the real thing is the passwd file.

This is a critical bug, if u think that it comes from a "native" ubuntu users admin tool. It looks like Intrepid can mess up itself (and its just adding an user with the tool in the main menu, not an administrative hard-to-perform task...) Oo

By the way, we can workaround it through terminal commands... But it requires more knowledge for the people who are migrating from others systems (not good to Ubuntu... Ex-windows users doesnt like terminals, lol)

Thanks schmeii, at least now i can handle my client's passwords without headache.

schmeii (schmeii)
Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
Changed in gnome-system-tools:
status: Confirmed → Triaged
importance: Undecided → Low
Changed in gst:
status: Unknown → New
Revision history for this message
bsh (bsh) wrote :

i have this "empty users & groups list" too, on a reinstalled 8.04.4. (it was working before, with 8.04, which i used for years until i gave the 10.04 upgrade a try... :) hence the reinstall...)
i have added users and groups manually with adduser and other commands (also with webmin). the /etc/groups and /etc/paswwd files are intact. the grpck doesn't find any problem either.
i have to note (as in many other cases it seemed to be important), that i'm using the desktop over a vnc connection. i had to unlock several things in the policy kit to allow me to access several "admin tools", such as users and groups. but it only affected the unlock button, as far as i can tell. i don't think the users&groups app would display anything if i'd log in locally (not with vnc), but i can not test this.

Revision history for this message
bsh (bsh) wrote :

i have forgotten to mention, that adding users didn't f##k up the system in any way. it's just the gui app not showing anything.

and i already found out why was that in my case (i wish if all things could be fixed this fast! :)
in my case, my "Real Name" contained national characters, which showed up wrong in the /etc/passwd file. the system obviously didn't know how to handle these characters or something. after editing the passwd file manually, the gui app started to work again.

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

That would be a different bug then. Could you paste here the line from /etc/passwd which was the problem? National characters shouldn't be an issue as long as they are in UTF-8; if they aren't, then some strange tool must have gone wrong when writing to it.

Closing the bug since in Lucid we no longer remove all users and groups when reading configuration fails. In Hardy we can't do this, but at least bug 160862 has a task for that, and it may well fix the same problem.

Changed in gnome-system-tools (Ubuntu):
status: Triaged → Fix Released
Changed in gst:
status: New → Fix Released
Changed in gst:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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