On Mon, Jun 05, 2006 at 09:44:41AM +1000, david wrote:
> On Mon, 2006-06-05 at 09:25 +1000, James Gray wrote:
> > On Mon, 5 Jun 2006 09:01 am, Matthew Palmer wrote:
> > > On Mon, Jun 05, 2006 at 06:57:59AM +1000, James Gray wrote:
> > > > On Sat, 3 Jun 2006 01:04 pm, david wrote:
> > > > > On my pure server boxes, I've activated the root account because it's
> > > > > the only account that I use. Why use sudo when every time I log in and
> > > > > everything I do on the box is done as root, and only I do it. I ssh
> > > > > into my own account, then su -
> > > >
> > > > "sudo -H -s" == "Start a root shell and set the $HOME env to /root"
> > >
> > > There's also sudo -i for much the same purpose.
> > 
> > Yeh, I've had mixed success with that switch.  Seems every sudo I use 
> > supports 
> > "-H -s" but only the Linux variants support "-i"...which sux when you 
> > divide 
> > your time between Solaris, the BSD's and Linux, then rsync the same .bashrc 
> > between all of them :P
> 
> All of which doesn't quite answer my original question, which was
> (restating it slightly):
> 
> This is a server, only I access it, and everything I do on it is done as
> root. I ssh [EMAIL PROTECTED], then su -   
> 
> So what is the advantage of su -i over simply activating the root
> account?

All the cool kids are doing it?  <grin>

Practically, not *everything* that you do on the machine is root-worthy --
some things you might *like* to do as root, but probably could get away
without it.  By the principle of least-privilege, if you can do it as an
ordinary user, you should do it as an ordinary user.  Otherwise one day
you'll be muttering around, mistype "rm -rf a/*" as "rm -rf a /*" and we'll
hear the swearing from four suburbs away.  Computers do the wrong thing much
faster than they do the right thing...

- Matt
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to