You are not logged in.

#1 2008-10-25 15:33:12

ixzus
Member
From: Barcelona (Spain)-Bristol (UK)
Registered: 2008-10-25
Posts: 26

su or sudo?

Hi,

I'm thinking of seting up Arch on my box and since, thank goodnes, I get to choose what I want for the first time I was wondering what is the best option using "su" to do administrative tasks or give my normal user some root privileges and use "sudo" instead.
First time I tried a linux distro, back in 1999, never heard of sudo and never needed it, this time almost all the new distros come with it. Is it safe/secure?

Thanx


"If at first an idea is not absurd, then there is no hope for it."  A. Einstein

Offline

#2 2008-10-25 16:14:11

robertp
Member
From: Warszawa, Poland
Registered: 2007-09-11
Posts: 123

Re: su or sudo?

sudo is a nice tool but it should be used only in special situations e.g. allowing some users to reboot, shutdown computer or run some trusted programs like ping or traceroute. The way sudo is used on Ubuntu (and I guess the way you want to use it) is totally insecure because the user can run ANY program with root privileges. Isn't it the same as working as root which is very discouraged?

So use su for all the administration things unless there is a special reason to use sudo.

Offline

#3 2008-10-25 16:14:32

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: su or sudo?

I use both. 'su' for general admin work that needs to be done from a root shell, 'sudo' for common commands like mounting and rebooting. The main advantage of sudo, IMO, is the ability to specify commands that don't need a password:

%wheel  ALL = NOPASSWD: /sbin/halt, /sbin/reboot

Adding this to /etc/sudoers (using the visudo tool) allows any user in the wheel group to shut down or restart the computer without entering a password.

Offline

#4 2008-10-25 16:18:18

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: su or sudo?

You can probably find some of your answers in here: 4 pages of sudo vs su


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#5 2008-10-25 16:19:20

mentallaxative
Member
From: Australia
Registered: 2008-07-14
Posts: 134
Website

Re: su or sudo?

Ubuntu uses sudo by default, so yes, I would say it is secure, _but_ you have to be mindful of when you use it. If you use it constantly without thinking about why you have to work with root privileges, then it loses its value.

I notice a lot of users here seem to like sudo. There was a thread a while back comparing su vs. sudo. Interestingly, the community at Sidux seems to favour su instead.

Offline

Board footer

Powered by FluxBB