The sudo manpage tells me, that I can preserve the environment by passing the -E option, which does not work in the case of $TMPDIR: > env | grep TMPDIR TMPDIR=/localdata/tmp > sudo env | grep ...
No matter what I try, it seems that the LD_LIBRARY_PATH environment variable is not kept after I run a command with sudo. The only way I managed to have it stick, is to prefix my sudo command with ...
For example, there is a line defining the rule in sudoers file: %wheel ALL=(ALL) NOPASSWD: $HOME/bin/ls is it valid? If not, is there an equivalent way to achieve this goal? Thanks.
Whenever I use the sudo command, none of my environment variables appear to be preserved. I've tried modifying the sudoers file, by removing the env_reset specification. #Defaults env_reset I've ...