Re: sudo not looking into /usr/local

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 16.11.2016 08:08, schrieb Samuel Rakitničan:
On Tue, 2016-11-15 at 18:42 +0000, Samuel Rakitničan wrote:

What about -E option?

Thanks for that, didn't take this into consideration. -E option
however seems to have no effect on PATH environment variable.

$ sudo -E env | grep ^PATH
PATH=/sbin:/bin:/usr/sbin:/usr/bin

Following however works, but I don't find it convenient, I might as
well type in the whole path (easier to remember). More so, I don't
want the whole user's PATH including user's /home, but just fewer safe
locations.

$ sudo PATH=$PATH env | grep ^PATH

You can change the default behaviour in "/etc/sudoers" or (better) by adding a file in "/etc/sudoers.d".

If you want to keep the users path, add:

Defaults env_keep += "PATH"
Defaults !secure_path

or to change the (default) secure path, just add

Defaults secure_path = /your/path/here:/as/usual
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux