Should sudo be used?

Garrett Cooper youshi10 at
Fri Apr 6 01:54:28 UTC 2007

Christian Walther wrote:
> On 05/04/07, Schiz0 <schiz0phrenic21 at> wrote:
> [Moved answer to the bottom -- please don't use top post]
>> On 4/5/07, Pietro Cerutti <pietro.cerutti at> wrote:
>> >
>> > On 4/5/07, Schiz0 <schiz0phrenic21 at> wrote:
>> > > I don't use sudo. I find it rather pointless. If I need to do
>> something
>> > as
>> > > root, I use su to gain root privileges, then when I'm done, I exit
>> and
>> > > return to the original user. The user running su must be in the group
>> > > "wheel" to be able to su to root. This is a simple yet convenient
>> > security
>> > > system.
>> >
>> > What when you have several people with different privileges wanting to
>> > do stuff that normally only root can? Would you give your root
>> > password to everyone, or rather install sudo and define exactly what a
>> > user can do?
>> >
>> True, if that was the case I'd use sudo. But I'm the only user on my
>> systems
>> that I'd trust with root access, so there's no point with my setup.
> Well, sudo makes execution of several commands or script as another
> user quite simple because there's no need to enter the root password.
> For example I've three Access Points at home, but my machine can't
> connect to the "nearest" one automatically. So I need to issue
> "ifconfig ath0 scan" as root. Since I'm not root all the time, I
> defined an alias that executes the command using sudo. It's just one
> word, and I'm set.
> My girlfriend is using my old Laptop know, and I installed FreeBSD on
> it, too. So she needs the command, too. Since she isn't used to the
> Console I defined a new program/button in KDE she can press.
> So you see, there are reasons to use sudo even if you're the only user
> on a system. But as anywhere else in the Unix world, there are several
> different ways of how to perform a certain task, and the way one
> chooses is up to him/her.

One thing I find that hasn't really been mentioned is that:
a) sudo can run programs under different user credentials that aren't
possible with non-wheel users. For instance if I had a binary, and I
told someone "hey, use sudo for this" and added them and the binary /
command to a script, everyone with access as specified via the sudo file
could run it.
b) sudo can run commands directly instead of having to type in su, and
then run the command from the su'ed shell.

Unless you're trying to get root access and fall under point b., and
this is your own personal machine, there's basically no use in using
sudo. Besides, one less binary on your machine with those sorts of
privileges offers less methods of attacking your machine in order to get
elevated privileges.


More information about the freebsd-questions mailing list