Why do all the sudo? [was Re: Software updater no longer functional]

Chris Green cl at isbd.net
Sun Jan 22 18:42:27 UTC 2017


On Sun, Jan 22, 2017 at 12:21:42PM -0500, Ken D'Ambrosio wrote:
> On 2017-01-22 12:12, Robert Heller wrote:
> 
> > > Yep! Couldn't agree more. I use 'sudo -i' a lot! But it's rarely
> > > suggested in any advice or documentation I've seen.
> > 
> > This is intentional.
> 
> It is.  But...
> 
> > sudo -i is *dangerous* for exactly the same reason "su" is dangerous.
> > One
> > of the whole points of sudo was to avoid logging in as root or using the
> > su
> > command.  Before sudo was "invented", UNIX sys admins regularly logged
> > in as
> > root and/or used su to gain a root shell.  And just as often shot
> > themselves
> > in the foot.  Sudo is very much like the safety lever on guns -- the
> > point is
> > to prevent accidents.
> > 
> > It is far too easy to *forget* that one is root and do something stupid.
> > Also
> > it is possible to leave your system open to someone sitting down at your
> > screen and doing something bad.
> 
> This is where I have to tepidly disagree.  No matter what you're doing, if
> you start doing mindless repetition of something (e.g., prefacing commands
> with 'sudo'), you're vastly more likely to make a Stupid Mistake.  To me, I
> do 'sudo bash' when I'm doing something specifically

Exactly!!!  Having done a 'sudo -i' there's the # prompt there to
remind you.

For the same reason I hate the alias of rm to 'rm -i' because very
soon one automatically ignores the extra prompt, it just wastes space
and time.

-- 
Chris Green




More information about the ubuntu-users mailing list