To SUDO, or not to SUDO. That is the question.

Monoman

Platinum Member
Mar 4, 2001
2,163
0
76
In all seriousness.. I'm an old fashion type of person and prefer to use SU still and have yet to check out SUDO. I installed Ubuntu yesterday and there wasn't a SU option by default and I was just wondering what you guys prefer? Do you disable root and use SUDO ONLY or just use SU or a combination of both?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Old fashioned? sudo's been around since like 1980... :p

I generally use sudo. It's just too easy.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: Monoman
I installed Ubuntu yesterday and there wasn't a SU option by default...
You mean that su wasn't even installed? That seems weird. It's part of the shadow package, which is pretty fundamental on every system. I guess it's possible not to build or install it, but it definitely sounds odd to me.
and I was just wondering what you guys prefer? Do you disable root and use SUDO ONLY or just use SU or a combination of both?
I use both. I can see the marginal protection offered by always sudo'ing - even if you allow NOPASSWORD for your account, you'll still have to explicitly type "sudo" for commands that require privileges. That may remind you to be careful about what you type. But if I'm doing anything extensive - like, more than a command or two - I find it irritating. So I pretty much just use sudo for one-liners (e.g. sudo dselect), and su if I'm doing anything more than that.

The real value of sudo is in multi-admin situations, IMO. That way you can specify what commands each person may and may not run with root privileges. But for a typical workstation or small server, I think it's kind of overkill.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: skyking
What's sudo?
Surely you know that the answer to that is man sudo. :)

But basically, sudo is su with lots more control over who can use it and what they can do with it.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
In Ubuntu the root account just doesn't have a password, therefore you can't log into it.

Actually, if you want to know the truth this is what I use:

sudo su -

sudo, super user do, su, become super user.

You see if your root you can use su to get into any accoount without a password, including root acount. So since sudo will run your command with root rights, then you can use su to become anything you want. That's why you want to restrict sudo severely from normal users.

Then the - means that the enviromental variables resets like you just logged in. The $PATH will include /sbin:/usr/sbin and stuff like that.
 

skyking

Lifer
Nov 21, 2001
22,722
5,848
146
Originally posted by: cleverhandle
Originally posted by: skyking
What's sudo?
Surely you know that the answer to that is man sudo. :)

But basically, sudo is su with lots more control over who can use it and what they can do with it.
Freebsd 4.11 stable
man sudo
no manual entry for sudo

:p

Of course, the RH 9 box at my bro's has it, but I never got started using sudo, since I started out with default Freebsd builds.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: skyking
Originally posted by: cleverhandle
Originally posted by: skyking
What's sudo?
Surely you know that the answer to that is man sudo. :)

But basically, sudo is su with lots more control over who can use it and what they can do with it.
Freebsd 4.11 stable
man sudo
no manual entry for sudo

:p

Of course, the RH 9 box at my bro's has it, but I never got started using sudo, since I started out with default Freebsd builds.

FreeBSD continues to disappoint...