How to keep environment variables when sudo in RHEL5
RedactedbyListAdministrator
RedactedbyListAdministrator
Mon Mar 16 09:52:15 UTC 2009
Hello,
I have problem whit keeping the environment variables when I running "sudo -s" in RHEL 5.
The variables I get when I login whit my user is set in /etc/profile , but are lost when I running "sudo -s"
[linus at server03 ~]$ export |grep PATH
declare -x PATH="/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin:/opt/appl/ground/services/bin:/opt/ground/appl_log/tools"
[linus at server03 ~]$
[linus at server03 ~]$ sudo -s
[root at server03 ~]# export |grep PATH
declare -x PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin"
[root at server03 ~]#
What should I do to keep them?
Regards Linus
More information about the redhat-list
mailing list