Ubuntu

Why does "gksudo -u <anything other than root>" always return error code 1?

Asked by l0b0 on 2009-11-02

This is normal:
$ gksudo -u root echo $HOME
/home/foobar
$ echo $?
0

But why does this return error code 1?
$ gksudo -u foobar echo $HOME
/home/foobar
$ echo $?
1

I'm running all commands as user foobar, which is a sudoer.

Interestingly, no error is reported by sudo in the same situation
$ sudo -u foobar echo $HOME
/home/foobar
$ echo $?
0

Using GKsu version 2.0.2.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gksu Edit question
Assignee:
No assignee Edit question
Last query:
2009-11-02
Last reply:
2009-11-02

log a bug.

Can you help with this problem?

Provide an answer of your own, or ask l0b0 for more information if necessary.

To post a message you must log in.