"gksudo -u <anything other than root>" always returns error code 1
Bug #470747 reported by
Victor Engmark
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gksu (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gksu
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 on Karmic.
To post a comment you must log in.
I suspect that this might be a duplicate of a very old bug: #51633
That being said, there are also other webpages saying that the gksu programs are not parsing the command line properly and that you should use '--' to convert a sudo command into a gksudo command.