Problem when making many users with "users admin. tool" at one time

Bug #31675 reported by Rafael Ávila Coya
10
Affects Status Importance Assigned to Milestone
GST
Fix Released
Critical
gnome-system-tools (Ubuntu)
Fix Released
High
Ubuntu Desktop Bugs

Bug Description

We have seen in a school, making practice of creating users with the GUI'ed "users administration tool" (the one that is in System->Administration->Users and Groups) that the utility gets traped and don't finish its job when you try to create many users at one time. It seems to work when you create up to 5 or 6, but more it doesn't. It happened to all the students that made it in one time (15 new users to be created)

Cheers!

Rafael Ávila Coya and his students

O Porrino, Galicia, Spain.

Revision history for this message
Phil Bull (philbull) wrote :

Thanks for the report.

Could you provide some more information about the problem, please? How are you trying to create many users at one time? One by one, and the application cannot add any more after 5 or 6 have been created? Or in another way?

What happens when adding users fails? Does the application crash, freeze, or just not add any more users?

Thanks again!

Changed in yelp:
status: Unconfirmed → Needs Info
Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
Revision history for this message
Rafael Ávila Coya (ravila-edu) wrote : Re: [Bug 31675] Problem when making many users with "users admin. tool" at one time
Download full text (3.4 KiB)

I tell you:

I am giving lessons of UNIX/Linux basics, using Ubuntu 5.10 Breezy (preview release in most of the computers) to 14 students, althougt at that time there were only 7 in the classroom.
We were making practice of creating users and groups, with the GUI 'user administration tool', and commands like adduser, useradd, usermod, addgroup, and so on. I told them that using the GUI tool could be the most easy and advisable way to create users, and then usermod and other commands to assign extra groups to each user and things like that. I suggested them to create accounts in there own computers for the rest of the users in the classroom (15, including me). As you know, with the GUI tool, you can edit 2 or more users, but they are not created until you click a "final" OK to the application. One student and me were clicking OK each 4 or 5 users (or so), and didn't have any problem. But it seems that the rest of them (5 students) introduced all the users (15) one after one, without clicking the "final OK" to the whole application. What happened is that, when they finally clicked OK, the app. start "working" but didn't finish. It didn't crashed, nor freezed. It got in
the state of "working", but never finishing the task, you understand?
I am now at home, and reproduced the situation in my laptop (I didn't bring it to the school, so it is a new machine!). I started the GUI and tried to create 13 new users (login names 'uno', 'dos', 'tres', 'cuatro', and so on (-< they are the numbers in spanish :-) )). I didn't put GECOS to anyone, and password was the login name of each user, just to make it the easy way. I assigned them, in the 'advanced' section, the home directory '/home/taller2/$user' , because I wanted to teach them that it's good costume to put users of different departments in different home subdirectories ("taller2" is the name of the classroom I teach). I left the rest of the options the default ones. Result? The same: It starts "working", but never finishes (when at lesson, I told them to swich to another desktop, but at the end of it, 1 and a half hours after, it was still "working"...). I woud say that the correct word for this is that it was freezed, but I am not sure which term is the correct
for that state.

I think I didn't forget any important thing. My advice is that you try to reproduce the same situation, and see it youself. I'm affraid I don't have enough knowledge to help. I don't even know where the 'user administration tool' package's source is!

Cheers and deep thanks to all of the community. You make this world a bit nicer and worthwhile.
Anything I can't help you, don't hesitate to contact me.

Rafael Ávila Coya.

----- Mensaxe orixinal -----
De: Phil Bull <email address hidden>
Data: Xoves, Febreiro 16, 2006 7:22 pm
Asunto: [Bug 31675] Problem when making many users with "users admin. tool" at one time

> Public bug report changed:
> https://launchpad.net/malone/bugs/31675
>
> Task: ubuntu yelp
> Sourcepackagename: yelp => gnome-system-tools
> Binarypackagename: yelp => None
> Status: Unconfirmed => Needs Info
>
> Comment:
> Thanks for the report.
>
> Could you provide some more information about the prob...

Read more...

Revision history for this message
Rafael Ávila Coya (ravila-edu) wrote :

I tell you:

I am giving lessons of UNIX/Linux basics, using Ubuntu 5.10 Breezy (preview release in most of the computers) to 14 students, althougt at that time there were only 7 in the classroom.
We were making practice of creating users and groups, with the GUI 'user administration tool', and commands like adduser, useradd, usermod, addgroup, and so on. I told them that using the GUI tool could be the most easy and advisable way to create users, and then usermod and other commands to assign extra groups to each user and things like that. I suggested them to create accounts in there own computers for the rest of the users in the classroom (15, including me). As you know, with the GUI tool, you can edit 2 or more users, but they are not created until you click a "final" OK to the application. One student and me were clicking OK each 4 or 5 users (or so), and didn't have any problem. But it seems that the rest of them (5 students) introduced all the users (15) one after one, without clicking the "final OK" to the whole application. What happened is that, when they finally clicked OK, the app. start "working" but didn't finish. It didn't crashed, nor freezed. It got in the state of "working", but never finishing the task, you understand?
I am now at home, and reproduced the situation in my laptop (I didn't bring it to the school, so it is a new machine! - Ubuntu Breezy (not preview, but the "real" one)). I started the GUI and tried to create 13 new users (login names 'uno', 'dos', 'tres', 'cuatro', and so on (-< they are the numbers in spanish :-) )). I didn't put GECOS to anyone, and password was the login name of each user, just to make it the easy way. I assigned them, in the 'advanced' section, the home directory '/home/taller2/$user' , because I wanted to teach them that it's good costume to put users of different departments in different home subdirectories ("taller2" is the name of the classroom I teach). I left the rest of the options the default ones. Result? The same: It starts "working", but never finishes (when at lesson, I told them to swich to another desktop, but at the end of it, 1 and a half hours after, it was still "working"...). I woud say that the correct word for this is that it was freezed, but I am not sure which term is the correct for that state.

I think I didn't forget any important thing. My advice is that you try to reproduce the same situation, and see it youself. I'm affraid I don't have enough knowledge to help. I don't even know where the 'user administration tool' package's source is!

Cheers and deep thanks to all of the community. You make this world a bit nicer and worthwhile.
Anything I can't help you, don't hesitate to contact me.

Rafael Ávila Coya.

Revision history for this message
Phil Bull (philbull) wrote :

Thanks for the explanation. I tried to reproduce this with ten users (named 'one' to 'ten'), but the users were created normally, with no freeze. Which version of the gnome-system-tools package do you have installed?

Could you run the application in a terminal, recreate the freeze, and see if any useful error text is printed to the terminal please? The command is:

sudo users-admin

Also, in another terminal, try the following command after the freeze has happened:

cat /etc/passwd | grep username

(where 'username' is replaced with the name of a user, e.g cuatro)

If the user has been added, it should appear in the output of that command.

Thanks!

Revision history for this message
Rafael Ávila Coya (ravila-edu) wrote :

Hi again, Phil!

It's a pity that you didn't go on introducing users. I reproduced what you did (10 users from 'one' to 'ten', home directory '/home/taller2/$user') and it doesn't freeze. I checked also /etc/passwd and /etc/shadow, and everything alright. [The reason that I told you that when creating over 5 or 6 users in one time it didn't work, was that me and other student didn't introduce more than 5 or 6 users at a time (and no problem), and the rest created the 14 in one time (and freezed). I should say that in one number between 6 and 15, the system couldn't create so many users. I'm sorry not to have explained it correctly in the first time].
But after the successful creation of 10 users, I did the same again, but now with 15 users (this time in greek :-) 'ena', 'dio' up to 'dekapente', and home directory '/home/taller3/$user'), and it freezed! In fact, it doesn't freeze; it's like if it gets trapped in a never-ending “while (1)” loop, because you can close the window nicely. Finally, I did it again with other 15 users ('un', 'deux', 'trois'..., home dir: '/home/room/$user'), but starting from a gnome-terminal ($ sudo users-admin ), and no message in the terminal (again “freezed”). This last fact proves that it must be in a kind of infinite loop, waiting for something. To be more explicit, you close the window with one click, but in the terminal it looks like it didn't notice, so you have to do in the terminal a CTRL-C.

In both cases (15 users to be created), no user is created, as I could check in /etc/passwd and /etc/shadow files.

For your information, my gnome-system-tools package version is 1.4.0-0ubuntu10, and users-admin version is 1.4.0

I recommend you to do it again with 15 (or more) users. Hope this info. is enough to give some light to this bug.

Cheers,

Rafael.

PD.: I have some screenshots of all processes, if you need them. If that's so, tell me and I'll send them to you.

Revision history for this message
Phil Bull (philbull) wrote :

Well, I tried adding 15 users and I still couldn't reproduce the freeze. However, I got a nastier problem instead!

After adding all fifteen and clicking 'OK', the app seemed to be doing something for a few seconds, then quit (no crash report etc). So I took a look at /etc/passwd and none of the new users were listed. Directories had been created for them in /home though.

I then found out that I couldn't use sudo (root), because of some authentication error. On typing sudo <commandname>, it would prompt me for my password and then fail to execute the command, silently. I couldn't use slocate either because 'the slocate group does not exist'. With my root access gone, I had to reinstall Dapper off CD.

Tricky one!

Revision history for this message
Phil Bull (philbull) wrote :

I've confirmed this, as I get problems too. Can anyone else reproduce this issue?

Also, I couldn't find an upstream bug.

Changed in gnome-system-tools:
status: Needs Info → Confirmed
Revision history for this message
Rafael Ávila Coya (ravila-edu) wrote :

I would also put the severity up to "major", because in my opinion, loosing your own password is a really big problem. I found upstream a similar bug (http://bugzilla.gnome.org/show_bug.cgi?id=315254) that affects g-s-t running on freeBSD, cataloged as MAJOR severity. In that bug, the users-admin tool hangs even if you create only one user. "It greys out and hangs indefinetly", as it happens to me.
[I didn't find the accurate english term before. Where I should say "it hangs" I was saying "it freezes", that is similar, but not the same].

Revision history for this message
Daniel Holbach (dholbach) wrote :

We should try to find ways of reproducing both issues and have separate bug reports for those. Could you try to get a backtrace, when users-admin hangs?

gdb -p $(pidof users-admin)
...
thread apply all bt

and paste the output here?

Changed in gnome-system-tools:
status: Confirmed → Needs Info
Revision history for this message
Phil Bull (philbull) wrote :

I'm a bit reluctant to trash my system again. I'll get a Dapper install up and running in vmware when I can and grab a backtrace in that.

Revision history for this message
Rafael Ávila Coya (ravila-edu) wrote :
Download full text (11.8 KiB)

Sorry, but I'm not expert in gdb.

I started users-admin and then, in a xterm, I did

sudo gdb -p 18641

The output was:

--------------------------------------------

GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
Attaching to process 18641
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

warning: could not load vsyscall page because no executable was specified

warning: try using the "file" command first
Reading symbols from /usr/bin/users-admin...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libgnomeui-2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnomeui-2.so.0
Reading symbols from /usr/lib/libbonoboui-2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbonoboui-2.so.0
Reading symbols from /usr/lib/libgnome-keyring.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnome-keyring.so.0
Reading symbols from /usr/lib/libgnomecanvas-2.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnomecanvas-2.so.0
Reading symbols from /usr/lib/libgnome-2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnome-2.so.0
Reading symbols from /lib/libpopt.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpopt.so.0
Reading symbols from /usr/lib/libart_lgpl_2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libart_lgpl_2.so.2
Reading symbols from /usr/lib/libpangoft2-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/lib/libgnomevfs-2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnomevfs-2.so.0
Reading symbols from /usr/lib/libbonobo-2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbonobo-2.so.0
Reading symbols from /usr/lib/libbonobo-activation.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbonobo-activation.so.4
Reading symbols from /usr/lib/libglade-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libglade-2.0.so.0
Reading symbols from /usr/lib/libgtk-x11-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libgdk-x11-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/lib/libatk-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libatk-1.0.so.0
Reading symbols from /usr/lib/libgdk_pixbuf-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdk_pixbuf-2.0.so.0
Reading symbols from /usr/lib/libpangocairo-1.0.so.0...(no ...

Revision history for this message
Rafael Ávila Coya (ravila-edu) wrote :
Download full text (14.5 KiB)

I thought that maybe it should be done the opposite way.

I started users-admin and create 15 users (with long passwords (6 to 10 caracters or so), just in case). Then, when it hanged (as usual), I enter a terminal and typed:

sudo gdb -p pid-of-users-admin

The output was:

------------------------

GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
Attaching to process 19617
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

warning: could not load vsyscall page because no executable was specified

warning: try using the "file" command first
Reading symbols from /usr/bin/users-admin...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libgnomeui-2.so.0...(no debugging symbols found).. .done.
Loaded symbols for /usr/lib/libgnomeui-2.so.0
Reading symbols from /usr/lib/libbonoboui-2.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbonoboui-2.so.0
Reading symbols from /usr/lib/libgnome-keyring.so.0...(no debugging symbols foun d)...done.
Loaded symbols for /usr/lib/libgnome-keyring.so.0
Reading symbols from /usr/lib/libgnomecanvas-2.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnomecanvas-2.so.0
Reading symbols from /usr/lib/libgnome-2.so.0...(no debugging symbols found)...d one.
Loaded symbols for /usr/lib/libgnome-2.so.0
Reading symbols from /lib/libpopt.so.0...
(no debugging symbols found)...done.
Loaded symbols for /lib/libpopt.so.0
Reading symbols from /usr/lib/libart_lgpl_2.so.2...(no debugging symbols found). ..done.
Loaded symbols for /usr/lib/libart_lgpl_2.so.2
Reading symbols from /usr/lib/libpangoft2-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/lib/libgnomevfs-2.so.0...(no debugging symbols found). ..done.
Loaded symbols for /usr/lib/libgnomevfs-2.so.0
Reading symbols from /usr/lib/libbonobo-2.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbonobo-2.so.0
Reading symbols from /usr/lib/libbonobo-activation.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbonobo-activation.so.4
Reading symbols from /usr/lib/libglade-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libglade-2.0.so.0
Reading symbols from /usr/lib/libgtk-x11-2.0.so.0...(no debugging symbols found) ...done.
Loaded symbols for /usr/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/lib/libxml2.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libgdk-x11-2.0.so.0...(no debugging symbols found) ...done.
Loaded symbols for /usr/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/lib/libatk-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libatk-1.0.so.0
Reading symbols from /usr/lib/libgdk_pixbuf-2.0.so.0...(n...

Revision history for this message
Gary Coady (garycoady) wrote :

I think these are both the same problem.

Creating a large number of users causes an invalid XML file to be sent to the backend - a line is truncated at 4096 characters, so it looks like a static buffer is filled.

The backend tools don't use a "real" XML parser, so they will try to use an invalid XML document. The corrupted file causes users not to be added, groups to be deleted, etc.

In my case, it deleted the groups: adm, tty, disk, kmem, dialout, fax, voice, cdrom, floppy, tape, sudo, audio, dip, operator, src, shadow, utmp, video, sasl, plugdev, staff, users, crontab, ssh, slocate, scanner and admin.

Revision history for this message
Gary Coady (garycoady) wrote : Example truncated in.xml

See line 483 of the file for the truncation.

Revision history for this message
Gary Coady (garycoady) wrote :

I didn't find where the 4095 char buffer problem is - it's somewhere in the processing of the backend script, the frontend sends the full contents without truncation.

A workaround would be to avoid having as long a line, by adding a linefeed after every addition of a user to the XML file.

Revision history for this message
Gary Coady (garycoady) wrote : Break up a long list of users into shorter lines

Patch adds linefeeds to keep the size of the lines below 4096 characters (in the XML file supplied to the backend). This works around an apparent limitation in the backend script.

Revision history for this message
Daniel Holbach (dholbach) wrote :

 gnome-system-tools (2.14.0-0ubuntu3) dapper; urgency=low
 .
   * debian/patches/28_break_long_lines:
     - add patch from Gary Coady <email address hidden> to fix Malone: #31675
       ("Problem when making many users with "users admin. tool" at one time")

Changed in gnome-system-tools:
status: Needs Info → 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.