[conspire] sudo -i vs sudo su - ? [Was:] Help with GRUB
Steve M Bibayoff
bibayoff at gmail.com
Thu Nov 5 00:10:55 PST 2009
On Wed, Nov 4, 2009 at 4:05 PM, Rick Moen <rick at linuxmafia.com> wrote:
> Quoting Steve M Bibayoff (bibayoff at gmail.com):
>> > On reflection, "sudo su -" is probably the method one should favour.
> It ensures that the root shell has user root's environment, and thus
> doesn't pick up any silly wack-assed stuff from the non-root user, such
> as unsafe additions to $PATH.
> If you're saying that "sudo -i" also does that, fine. That was not
> entirely clear from the manpage snippet I quoted -- whereas it's very
> clear that "sudo su -" does it.
wasn't clear to me either. Just thought someone might have some insight.
a little experiment clears it up for me:
$ sudo -i
# env > dash_i
$ sudo su -
# env > su_dash
# diff dash_i su_dash
So it does seem like sudo -i carries alot(some?) crude from user.
More information about the conspire