LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   su vs. sudo (https://www.linuxquestions.org/questions/slackware-14/su-vs-sudo-715066/)

sahko 03-28-2009 07:15 AM

su vs. sudo
 
I am curious.

Hangdog42 03-28-2009 07:41 AM

Can't answer the poll because it isn't an either/or problem. For one-line commands I use frequently, I tend to use sudo, for longer sessions as root, I'll use su.

H_TeXMeX_H 03-28-2009 08:05 AM

I say sudo is overrated, I don't even install it.

sahko 03-28-2009 08:07 AM

Quote:

Originally Posted by Hangdog42 (Post 3490514)
Can't answer the poll because it isn't an either/or problem. For one-line commands I use frequently, I tend to use sudo, for longer sessions as root, I'll use su.

That sounds like an "I do".

allend 03-28-2009 08:22 AM

The only place that I use sudo is in my laptop so that I can do suspend to disk without having to su to root.
For all the rest, if I want to play God, then su and typing a password is a small price to pay. I like the discipline of thinking about whether I really need root privileges to perform a task.

garyg007 03-28-2009 11:01 AM

Neither one!.

If I need root access to a folder, I will open it using file-manager in super-user mode;

If I need root privileges at a command line, I will open the terminal program in super-user mode.

Jeebizz 03-28-2009 11:15 AM

I don't use sudo. I might see a 'slight' advantage to not having to type in your root password to do certain administrative tasks, but in the long run to me that can be a security risk if somebody else is using your computer and decides to mess around with commands. Especially if the user is unexperienced, and stumbles upon sudo, you may as well just gives them your root account. I prefer su. To me it is a lot safer anyways. Plus I am also too lazy to even bother setting up sudo.

Jeebizz 03-28-2009 11:21 AM

Quote:

Originally Posted by garyg007

Neither one!.

If I need root access to a folder, I will open it using file-manager in super-user mode;

If I need root privileges at a command line, I will open the terminal program in super-user mode.
Technically you ARE using su, especially in CLI mode. The only thing is you are not ACTUALLY typing 'su', but are presented with a password prompt, its just that 'su' has already been called upon for you by the super user terminal, or super user mode in a file manager. You are merely typing your password for root.

adriv 03-28-2009 11:55 AM

Quote:

Originally Posted by Jeebizz (Post 3490670)
but in the long run to me that can be a security risk if somebody else is using your computer and decides to mess around with commands. Especially if the user is unexperienced, and stumbles upon sudo, you may as well just gives them your root account.

I agree with that. My kids know my normal user login password, so they'd also have access to sudo (which is not a very good idea...).
Plus, my root password is a lot harder to guess, ;)

hitest 03-28-2009 12:05 PM

I use su.

brianL 03-28-2009 12:53 PM

Su's the girl for me. :)

C-Sniper 03-28-2009 01:18 PM

I use su, unless I have to open a gui from console, then I have to use sudo.

Nille_kungen 03-28-2009 03:13 PM

'su -c' if i only need one command and 'su -' if i need to work as root.

Hangdog42 03-28-2009 03:47 PM

Quote:

I might see a 'slight' advantage to not having to type in your root password to do certain administrative tasks, but in the long run to me that can be a security risk if somebody else is using your computer and decides to mess around with commands. Especially if the user is unexperienced, and stumbles upon sudo, you may as well just gives them your root account.
Unfortunately, the perceptions of sudo have been completely ruined by the bastardization that *buntu has promoted. You shouldn't be using sudo to grant general root access, that isn't what it is intended to do (even though it can). The whole purpose of sudo is to grant root access to a limited number of commands. Anyone using sudo to grant general root privileges is abusing it.

bergman 03-28-2009 04:02 PM

yeah I do what Hangdog suggests, I use sudo, but exact commands which shouldnt do any harm if someone other than myself got on to the system.

Burning discs (cdrecord requires root permission), mounting discs, running security tools like kismet and rkhunter.

I will su for occassional commands though.


All times are GMT -5. The time now is 02:17 AM.