gksudo 16.10

Ralf Mardorf silver.bullet at zoho.com
Sun Nov 6 11:25:39 UTC 2016


On Sun, 6 Nov 2016 12:05:49 +0100, Ralf Mardorf wrote:
>[rocketmouse at archlinux ~]$ sudo -u chuser echo $HOME
>/home/rocketmouse
>[rocketmouse at archlinux ~]$ cat /usr/local/bin/chuser 
>#!/bin/sh
>
># /usr/local/bin/chuser -> /.chuser/bin/chuser
>
>xhost +
>gksudo -u chuser "$*"
>xhost -
>exit
>
>[rocketmouse at archlinux ~]$ chuser echo $HOME
>access control disabled, clients can connect from any host
>/home/rocketmouse
>access control enabled, only authorized clients can connect

Just in case it could be related to build in bash command vs running a
bin:

[rocketmouse at archlinux ~]$ sudo -u chuser /usr/bin/echo $HOME
/home/rocketmouse
[rocketmouse at archlinux ~]$ gksudo -u chuser /usr/bin/echo $HOME
/home/rocketmouse




More information about the ubuntu-users mailing list