using gksu to run an X program as a different user other than root is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gksu (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
say I am logged in as user1. At a command prompt I type:
$ su user2 somecommand
and at the password prompt user2's password must be entered.
But if I type:
$ gksu -u user2 somecommand
and enter user2's password, I get:
GNOME_SUDO_PASS
sudo: 1 incorrect password attempt
and a pop up box telling me "Wrong password." However, if I enter user1's password it proceeds and runs the command. This is very wrong behavior IMHO.
I gather this is because gksudo has been patched to use sudo as backend authentication, equivalent to (?) using the --sudo-mode flag in the unpatched version. according to the man page:
--sudo-mode, -S
Use sudo instead of su as backend authentication system. Notice
that the X authorization magic will not work when using sudo for
and therin lies the problem; the X authorization magic is broken.
For correct behavior, if I am logged in as user1 and user2 wants to run say, their mail program, without logging out and loging into their own desktop, they should be able to type 'gksudo -u user2 mailprogram' and have it work (this used to work in previous versions)
firstly gksu now defaults to the sudo mode.
so you would like to see this changed?
secondly there is a bug in gksu using a wrong path for xauth.