698 - 'su' does not pick up customized environmental variables
C. Scott Ananian
cscott at laptop.org
Wed Mar 12 18:07:02 EDT 2008
On Wed, Mar 12, 2008 at 4:34 PM, Mikus Grinbergs <mikus at bga.com> wrote:
> 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 ?
Read the man page for su. You probably need 'su -l' or 'su -p'.
OLPC's su is unchanged from fedora; the only change is that members of
wheel are allowed to su w/o password. No magic is involved.
--scott
--
( http://cscott.net/ )
More information about the Devel
mailing list