It was thus said that the Great David Riley once stated:
On Dec 14, 2011, at 4:21 PM, Sean Conner wrote:
It was thus said that the Great Richard once
stated:
In article <539CFBE84C931A4E8516F3BBEA36C7AA4D7E8D75 at 505MBX1.corp.vnw.com>,
Rich Alderson <RichA at vulcan.com> writes:
That's an awful lot of schratzing around to
accomplish what a simple
GUNRUP% sudo /bin/bash
will do for you. (I use this frequently on my Snow Leopard system.)
Is there some reason you don't do 'sudo -i'?
Basically, yes. I *loathe* sudo [1], so the less I have to use it, the
better. I made the assumption that sudo bash (or any other number of
commands that have been presented) were locked, because what's the *point*
of sudo if you can just simply do "sudo bash"? [3]
The point is so you don't do something stupid accidentally, like "chmod -R
666 /". It's just a safety; it's not meant to lock people out of having
root shells, it's just to prevent them from doing it routinely. It's been
useful to me in that respect, as it has prevented me from doing stupid
things accidentally because I wasn't in a root shell.
So far, the only difference I see between "su -" and "sudo -s" is
what
password I type. I've helped other admins set up sudo. That's why I don't
bother with it, becuase it's a freaking pain to set up to allow "limited"
access.
When I beome root, it's to run a series of commands, and to become root, I
have to type in a command. And in fact, I can't remember the last time I
ran only *one* command as root. And frankly, I don't become root very often
(just to install software (compiled from the tarball, or maybe the package
system du jour) or restart a downed or non-functioning daemon).
Have I accidentally deleted files? Yeah, but I've done that as a non-root
user with disasterous results. Those using sudo because "it's more secure"
are deluding themselves, in my opinion.
It also has the alternate function of granting limited
admin powers to
non-superusers, but I would argue that anything other than a whitelist of
commands is asking for trouble in that regard (and it's probably just not
a great idea in general, given how many programs have doors out the side,
like vi).
I can't think of many commands that 1) won't give you root access via some
method, or 2) are very useful by themselves as a one-off in root.
-spc (But I can see I'm in a very small minority ... )