Fwd: Another reason to prefer a real root over sudo
Rashkae
ubuntu at tigershaunt.com
Fri Feb 6 14:32:53 UTC 2009
Pierre Frenkiel wrote:
> On Thu, 5 Feb 2009, Rashkae wrote:
>
>> No, not a bug, but exactly what you asked for with that combination of
>> options.
>
> no. cf "man su"
> ==============================================================
> -, -l, --login
> Provide an environment similar to what the user would expect had the user logged in
> directly.
>
> -m, -p, --preserve-environment
> Preserve the current environment.
> ==============================================================
>
>
> so, the 2 options seem contradictory, but actually, -p doesn't preserve variables
> that are set by any login script (.profile, ...)
>
No, but -p preservers $HOME, and your login scripts, as per the bash
man page, are:
~/.bash_profile, ~/.bash_login, or ~/.profile.
~, by the way, is a shortcut for $HOME
You see the problem now?
More information about the ubuntu-users
mailing list