[ale] sudo shells [Was: Stupid Question Time]

Pete Hardie pete.hardie at gmail.com
Fri Feb 3 13:42:03 EST 2012


One thing I recall from long ago was that it was considered good
practice to kepe root's PATH minimal, exclude '.', and containing only
system directories, to prevent accidental running of trojans named the
same as commands like 'ls' and 'grep'

On Fri, Feb 3, 2012 at 13:34, David Tomaschik <david at systemoverlord.com> wrote:
> 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
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo



-- 
Pete Hardie
--------
Better Living Through Bitmaps



More information about the Ale mailing list