sudo - impossible to retain/specify PATH
Binary package hint: sudo
I need to be able to run sudo with additional non-std binary folders in the PATH. Having already added my requirements to /etc/environment I was surprised when I got errors about missing commands when running them under sudo.....
I tried the following to fix this without sucess:
1) Using the "sudo -E" option - did not work. My existing PATH was still reset by sudo
2) Changing "Defaults env_reset" to "Defaults !env_reset" in /etc/sudoers - also did not work (even when combined with sudo -E)
3) Uncommenting env_reset (e.g. "#Defaults env_reset") in /etc/sudoers - also did not work.
4) Adding 'Defaults env_keep += "PATH"' to /etc/sudoers - also did not work.
Clearly - despite the man documentation - sudo is completely hardcoded regarding PATH and does not allow any flexibility regarding retaining the users PATH. Very annoying as I can't run non-default software under root permissions using sudo.