"gksu -u other_user .." is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gksu (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I did this test run with Lubuntu 13.10 amd64 and Xubuntu 13.10 amd64 in separate VMs.
Steps to reproduce:
- Install fresh Lubuntu/Xubuntu
- Open the XFCE terminal.
- Type "sudo -i", enter password, and do the following:
# create a secondary useraccount
adduser testuser
# use nano or your favorite editor:
nano /etc/sudoers.
# allow your main useraccount to execute ANY commands as the "testuser" user using sudo. password will NOT be required
your_
# save the file.
# set permissions of sudoers.d correctly
chmod 440 /etc/sudoers.d/*
- now open a shell as your main user, NOT as root. do:
gksudo -u testuser xfce4-terminal
This should open a terminal logged in as "testuser". But it does nothing.
Add the debug option and pipe to less to view what happens: "gksudo -du testuser xfce4-terminal 2>&1 | less"
Output:
No ask_pass set, using default!
xauth: /tmp/libgksu-
STARTUP_ID: gksudo/
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: testuser
cmd[7]: --
cmd[8]: xfce4-terminal
buffer: -No protocol specified-
buffer: --
buffer: -(xfce4-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
(a lot more of the previous messages)
brute force GNOME_SUDO_PASS ended...
No password prompt found; we'll assume we don't need a password.
xauth: /tmp/libgksu-
xauth_env: /home/xor/
dir: /tmp/libgksu-wPttP0
The fact that there is output of xfce4-terminal BEFORE gksudo talks about password, .Xauthority, etc. might indicate that it tries to run the child application too early? I haven't read the source code though, please validate this claim by reading it.
Status changed to 'Confirmed' because the bug affects multiple users.