Consolehelper and sudo (was Re: Export)

William Hooper whooperhsd3 at earthlink.net
Fri Jan 16 23:08:32 UTC 2004


Bevan C. Bennett said:
> su works because you end up with root's environment variables (and
> path), thus avoiding consolehelper entirely.

No you don't:

[whooper at kenny whooper]$ su -c printenv | grep PATH
Password:
JAVA_PATH=/usr/java/j2re1.4.2_02
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/java/j2re1.4.2_02/bin:/home/whooper/bin
[whooper at kenny whooper]$ sudo printenv | grep PATH
JAVA_PATH=/usr/java/j2re1.4.2_02
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/java/j2re1.4.2_02/bin:/home/whooper/bin

[whooper at kenny whooper]$ su -c "which up2date"
Password:
/usr/bin/up2date
[whooper at kenny whooper]$ sudo which up2date
/usr/bin/up2date
[whooper at kenny whooper]$

I assume they use xauth differently and that is why one works and the
other doesn't.

--
William Hooper





More information about the fedora-list mailing list