Re: How to keep environment variables when sudo in RHEL5

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

 



> 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@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@server03 ~]$
>
> [linus@server03 ~]$ sudo -s
> [root@server03 ~]# export |grep PATH
> declare -x PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin"
> [root@server03 ~]#
>
> What should I do to keep them?

Add those items to the root user's profile, as well.
-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@xxxxxxxxxxxxxxxxx

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux