On Tuesday 10 August 2010 03:18:05 William Hubbs wrote:
> On Mon, Aug 09, 2010 at 05:30:40PM -0700, Kevin O'Gorman wrote:
> > On Mon, Aug 9, 2010 at 1:20 PM, Bill Longman <bill.long...@gmail.com> 
wrote:
> > > On 08/09/2010 01:08 PM, Robert Bridge wrote:
> > > > On Mon, Aug 9, 2010 at 8:09 PM, Mick <michaelkintz...@gmail.com> 
wrote:
> > > >> There have been discussions on this list why sudo is a bad idea and
> > > >> sudo
> > > 
> > > on
> > > 
> > > >> *any* command is an even worse idea. You might as well be running
> > > 
> > > everything
> > > 
> > > >> as root, right?
> > > > 
> > > > sudo normally logs the command executed, and the account which
> > > > executes it, so while not relevant for single user systems, it STILL
> > > > has benefits over running as root.
> > > 
> > > ...excepting, of course, "sudo bash -l" which means you've given away
> > > the keys to the kingdom.
> > > 
> > > I actually prefer "sudo su -" -- as long as I'm giving it away!  :o)
> 
> Afaik, there is no reason for "sudo su -"  It should be either
> 
> su -
> 
> or, if you are using sudo,
> 
> sudo -i

So what is the difference between "sudo -i" and "sudo su -" then? Please be 
precise.


> The disadvantage of "su -" is that it requires the user to know the root
> password.  But, "sudo -i" does the same thing without requiring the user
> to know the root password.

You seem to have confused ideas about authentication and authorization. They 
are not the same thing and harder is not always better.

I have 100+ machines (all distinctly different) that my team runs and sudo is 
on all of them. They all have a root password but no-one knows it anymore, 
it's tucked away nice in the safe just in case the whole team dies in a plane 
crash.

Meanwhile, we know each user is authenticated - ssh let them in with the right 
key, which they managed to unlock. To run a command as root, they must re-
authenticate with their password (unused till this point) and then they can do 
their jobs. We also know that they are authorized - this is the entire point 
of /etc/sudoers and it has no other purpose than authorizing users to do 
things what, when and where.

Knowing a root password is simply a second factor of authentication. It might 
as well be their own password. Well-known root password opens a security can 
of worms anyway and you don;t want to do where that leads.

So tell me again why sudo su - is inherently bad? Other than three extra 
keystrokes that is? And what about sudo implementations that don't support -i?



-- 
alan dot mckinnon at gmail dot com

Reply via email to