698 - 'su' does not pick up customized environmental variables

Mikus Grinbergs mikus at bga.com
Wed Mar 12 16:34:31 EDT 2008


I need to set some environmental variables (e.g., http_proxy) 
because I have a wired connection which goes through a proxy.

It used to be that issuing 'su' put me into root, but kept the 
environmental variables set by /etc/bashrc for user 'olpc'.  With 
698, 'su' gives me environmental variables *without* my 
customizations.  [The (alt-ctl-F1) text console correctly gives me 
the customizations set by /etc/profile.]

When I issue 'su -l', that gives me the customizations set by 
/etc/profile.

How come a plain 'su' now sets up its own environmental variables, 
_bypassing_ both /etc/bashrc and /etc/profile, when previously it 
would pick up the environmental variables of the user it was issued 
from ?

mikus



More information about the Devel mailing list