users-admin hangs immediately when run as root

Bug #685215 reported by Eliah Kagan
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Won't Fix
Undecided
Simon Graber

Bug Description

Binary package hint: gnome-system-tools

When users-admin is run as root, whether by sudo, gksudo, or from a root shell (started with "sudo su"), it hangs. The "busy" mouse pointer (spinny wheel, with the default theme) is shown. The widgets in the window are drawn (though the users list is not populated), but faded out and unusable. It does not monopolize CPU resources in this state. SIGTERM kills it without incident.

This is on a 64-bit Maverick system (with version 2.32.0-0ubuntu1 of gnome-system-tools). The output of "uname -a" on this system is:
Linux Apok 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010 x86_64 GNU/Linux

When run as a non-root user, users-admin works without problems, including when performing tasks requiring it to elevate privileges to root while running (e.g. creating a user). And it works fine when a non-root user runs it as an alternate non-root user.

I have also reproduced this bug on a 32-bit Maverick system, as well as a 32-bit Natty system (same gnome-system-tools package version).

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gnome-system-tools 2.32.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-23.41-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic x86_64
Architecture: amd64
Date: Sat Dec 4 10:36:40 2010
ExecutablePath: /usr/bin/users-admin
InstallationMedia: Xubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100406)
ProcEnviron:
 PATH=(custom, no user)
 LC_MESSAGES=en_US.utf8
 LANG=en_US.utf8
 LANGUAGE=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gnome-system-tools

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

But this is not a bug. You shouldn't run users-admin as root, as you don't need to, and it potentially creates security issues.

Changed in gnome-system-tools (Ubuntu):
status: New → Won't Fix
Revision history for this message
Eliah Kagan (degeneracypressure) wrote :

In that case, I would suggest that it is still a bug, but a different one: When run as root, users-admin hangs instead of displaying a message instructing the user as to how to use it properly (and then exiting).

In my opinion, the current behavior sends the message to the user that it is appropriate to run users-admin as root, and that it's just failing on their system for some reason unknown to them. Hanging and not responding to any user input is not a common way for an application to react to user behavior that is anticipated but incorrect.

(Or it might be better for users-admin to display a warning message but allow the user to proceed as root if they insist. I don't ordinarily run users-admin as root, but I tried to do so because it is unable to elevate privileges by itself on my Natty system, for some reason. I'm going to look into that situation and submit a bug report for it shortly, if appropriate. But problems with programs elevating privileges themselves do occur from time to time.)

Should I open a new report for this, with wishlist status?

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

You could, but I can sear you nobody will ever work on this because 1) nobody usually works on users-admin except myself, and 2) users-admin is going to be replaced, so we're not really fixing this kind of detail. Feel free to provide a patch though, but filing a bug would really waste your time... ;-)

Revision history for this message
Eliah Kagan (degeneracypressure) wrote :

If I submit a patch, would it be a problem to fix the issue by having users-admin display a message like, "Users Settings does not support being run as root. Please run it as a non-root user, and it will automatically acquire superuser privileges if necessary."?

My concern is that such a message would then need to be translated, which would require the effort of additional people and might not be worthwhile since users-admin is being replaced.

Would it be preferable to "fix" the issue by making user-admin work when run as root? Would you consider accepting a patch that did that?

I would consider writing a patch (no promises!)...but not if it would make users-admin behave in a way you would consider undesirable.

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

Of course, it would be slightly better to fix users-admin not working as root, rather than showing an error message, just in case some very special distributions or users need this. But I'd accept a patch showing a dialog too if it's well written... I don't think translators will mind - if you think it's worth your time, they will take a few seconds to translate it.

But for the message, it wouldn't be specific to users-admin, rather common to all tools, so something like "This program shouldn't be run as root. Please run it as a normal user and let it acquire privileges when necessary." would be better.

Revision history for this message
alainpannetier (alain-pannetier) wrote :

In most operating systems I worked on (and that includes a lot of different Unix flavours), the most natural system administration account used when one needs to create user accounts, is that of the system admin. For some reason Linux does it the other way round: root cannot do it and everybody else can. Best of all the reason invoked is that "it potentially creates security issues" (probably more than everybody being able to create user accounts).

Surely, all other operating systems are wrong and Linux is undoubtedly right.

Luckily enough people in the know relentlessly enlighten simpletons like me with sentences along the tune of "you should not do/need etc".

No doubt the amount of time spent initiating us mere mortals is nothing compared to what would be necessary to test whether the currently executing user is 'root', issue an informative message box and exit... or just doing nothing and let root sys admins use sys admin tools.

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

users-admin is _dead_. So don't expect us to work on it anymore. File bugs against the new control center if there are.

And any OS that suggests you to run a graphical session as root is dumb. There are hundreds of ways a GUI can create security holes. Creating an admin account that isn't root has all the advantages of the latter, and none of the drawbacks.

Revision history for this message
Eliah Kagan (degeneracypressure) wrote :

@alainpannetier
You have misunderstood. Non-administrators cannot create user accounts (nor can they perform other administrative tasks). Being root is not the same thing as being an administrator. And the security model you are misunderstanding does not apply to Linux-based operating systems as a whole (just to some distributions, including Ubuntu), nor does it apply only to Linux-based operating systems. (For example, openSUSE doesn't use this security model, but Mac OS X does. And Debian formally supports this security model but also formally supports a different model.)

I Ubuntu, for many administrative tasks, administrators run programs as root with sudo (or its graphical frontends, gksu, gksudo, and kdesudo). Only administrators can do this--regular users cannot. For other administrative tasks, like creating/managing user accounts with users-admin, the PolicyKit daemon (which itself runs as root) is asked to perform administrative operations--it will only "agree" to perform them if the user who is asking is an administrator.

This bug is not a good place to discuss the general issue of how authentication is performed for administrative tasks. Please read https://help.ubuntu.com/community/RootSudo and http://en.wikipedia.org/wiki/PolicyKit if you have not done so already, and if you are still want to discuss or ask about this matter, please post a question (https://answers.launchpad.net/ubuntu/+addquestion). You can post a link to the question here, and I'll make sure to subscribe to the question and to attend to it (if nobody else does first), but since the issue you have raised is not specifically about this bug, it should not be discussed further here. If you have questions about why this bug was marked Won't Fix, posting a question would also be the most appropriate way to ask about that.

Revision history for this message
Stephen Richards (s-m-richards) wrote :

"users-admin is _dead_. So don't expect us to work on it anymore. File bugs against the new control center if there are."

You may consider it dead, but I am sitting here today, nearly a year later, trying to add users on Ubuntu 11.04 using Users Settings and having this very problem. Users Settings is still present on the Ubuntu System menu and this problem is still there. For a dead program it is having a busy afterlife.

While it may satisfy you to enlighten the rest of us that this program should not be run as root, in the real world where the rest of us live I am sitting here with a frozen/grayed-out Users Settings dialog as described in the original post, and wasting my time Googling to find an answer as to why I cannot proceed. Asserting on an obscure forum that I am "doing it wrong" rather than fixing the problem by, at the very least, adding an informative error message as the original but reporter proposed, is not only not helpful, it is the opposite of helpful. Considering that Ubuntu brands itself as the easy-to-use Linux, that attitude borders on incomprehensible.

And do I need to point out the Catch-22? You assert that I need to make users from a non-root account. How do I create that non-root account IF I CANNOT MAKE USERS FROM THE ROOT ACCOUNT USING A GUI-BASED PROGRAM THAT IS OBVIOUSLY THERE FOR THAT PURPOSE? While the answer may be obvious to you, there are others on earth to whom it is not.

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

Sorry, I should have made clear I was speaking from an upstream (GNOME) point of view. I've not said Ubuntu wouldn't fix the problem (even if I know they won't). Ubuntu ships a version of users-admin that's more than a year old, so even if I fixed things upstream you wouldn't notice. My advice (to Ubuntu) is that they move to the new GNOME control center users applet.

As for the specific problem of running as root, AFAIK any newly installed system comes with a non-root admin account. And something I *did* fix in users-admin when it was still developed is that it will not allow you to remove the last admin account.

Changed in gnome-system-tools (Ubuntu):
assignee: nobody → Simon Graber (simon-graber19-sg)
Revision history for this message
Joe Philipps (2-launchpad-joe-philipps-us) wrote :

The initial report of this was nearly six years ago. If this program is so "dead," I have to wonder why here in late Sep. 2016 on an up-to-date Raspbian system this is still the default app run when Xfce users run the "Users and Groups" item on the System main menu. I guess it's either not as dead as you thought, or many distribution maintainers including the Raspbian folks should be using something else (and what, I do not know).

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

It's actually dead since upstream archived the project several years ago. XFCE should have took it up, or moved to another tool.

Anyway, you shouldn't need to run it as root.

To post a comment you must log in.
This report contains Public information  
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.