[ale] sudo shells [Was: Stupid Question Time]
David Tomaschik
david at systemoverlord.com
Fri Feb 3 13:34:59 EST 2012
On Fri, Feb 3, 2012 at 10:39 AM, mike at trausch.us <mike at trausch.us> wrote:
> On 02/03/2012 10:31 AM, David Tomaschik wrote:
>> It's personal preference, but I'm curious if anyone has motivations
>> for sudo -i. I suppose if you want your session to really be a "root
>> shell" with a "root-like" environment, it's useful.
>
> I prefer a sanitary environment when I go executing commands as other
> users. My home environment is chock full of stuff on every system I am
> on; custom $PATH and so forth.
>
> Anything that is really important to have in-sync with the root account
> (if, that is, I am the only person who uses the root account, or the
> only person that uses the customizations anyway) then I will cp it from
> my home directory to root’s home directory.
>
> Half the time I use sudo it isn't to become root, but to become another
> user in order to test that things I am working on aren't dependent on my
> environment settings anyway. :-)
>
> Besides, sometimes you will run a command under "sudo -s" and what you
> find later on is that root created a bunch of crap that has made your
> stuff unhappy in your home directory... I don't like that. :-)
>
> --- Mike
It's kind of ironic: my motivation is "I like sudo -s because it keeps
my home directory around" and yours is "I like sudo -i because it does
not keep my home directory around."
It's worth noting that using "sudo _some_command_" will also mess with
your home directory if you run a command that creates files there.
--
David Tomaschik
OpenPGP: 0x5DEA789B
http://systemoverlord.com
david at systemoverlord.com
More information about the Ale
mailing list