4
votes
1answer
91 views

sudo -E not passing all variables

Reading the man pages I expected sudo -E to pass all environment variables to the subshell, but I am not getting the expected results. As expected, awesome: $ export ...
2
votes
2answers
358 views

sudo, runuser, su don't work as I expect when run as root with command as “echo $HOME”

When I run these commands it outputs as shown. /root sudo -u someuser -i "echo $HOME" /root runuser -l someuser -c "echo $HOME" /root su - someuser -c "echo $HOME" /root What i expected was ...
12
votes
3answers
23k views

How do I make sudo preserve my environment variables?

Using sudo 1.7.4p4 on Solaris 5.10 and sudo 1.6.7p5 on RHEL4 u6 I can't see how to preserve my environment variables, for instance $PYTHONPATH. I've added this line to sudoers, but it doesn't make any ...
1
vote
1answer
871 views

Set environment variable for another user (Standalone Trac problem)

I'd like to run tracd (Trac in standalone mode) with custom template for multiple repository list: $ tracd -p 8080 -e /my/projects/path For custom template, I need an environment variable (as said ...
0
votes
2answers
826 views

Make environment variables available when running command as sudo

I am using Curl, and am having a problem trying to get it to recognize the $http_proxy environment variable when using sudo curl. I tried putting export http_proxy=.... in my /etc/profile and ...