LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   All parties in the matter of Sudo v. Root Account please rise... (https://www.linuxquestions.org/questions/linux-general-1/all-parties-in-the-matter-of-sudo-v-root-account-please-rise-866642/)

Kenny_Strawn 03-05-2011 03:05 PM

All parties in the matter of Sudo v. Root Account please rise...
 
What do you use to gain administrative privileges on your Linux system?

I used to use sudo but now with ArchBang I have no choice but to log in as root. However, I think that using sudo is more secure than the root account for the same reasons that the Ubuntu developers think so: because the root account is a prime target for password crackers. Because password crackers know that there is an account named "root" and that it is administrative, they will attempt to crack its password before they crack any other password. What is your detailed opinion?

Kenny_Strawn 03-05-2011 03:40 PM

What are the detailed explanations for your votes, those besides me who voted?

XavierP 03-05-2011 06:49 PM

Archbsng does have a sudoers file, why can't you use it?

eveningsky339 03-05-2011 07:02 PM

I use su and sudo su most often. I never login as root, because I can stroll about happily destroying my system if I don't pay attention to file management.

Telengard 03-05-2011 07:20 PM

Kubuntu is my Linux of choice, so I use sudo most of the time. On a few occasions I have found it convenient to have a root shell, and Kubuntu includes a terminal sessions option for exactly that.

I guess if I were on Slackware or LFS I'd login as root with a really, really strong password. And that would be fine too.

As for which is better, I really think it depends on your security needs. For a single user desktop system I'm pretty sure I like sudo better. Multi-user systems and headless servers may be otherwise.

frankbell 03-05-2011 09:54 PM

If the root login is available and if I have lots of administrative stuff to do (as when setting up a new system), I prefer to login as root, do my root stuff, and get out.

For the occasional tasks, I would rather su than sudo--enter my password once, do the tasks, get out.

Sudo is a nag.

I consider it sad that Ubuntu has managed to convince a large contingent of computer users that a root login is somehow inherently unsafe. Having adequate security and distrusting your users are, to my mind, not the same thing.

And if I break something, then I fix it. That's how I learned the little bit I know about vi.

I started with Slackware. No doubt that has colored my views.

k3lt01 03-05-2011 10:27 PM

I use Debian and during setup you have an option to set up a Root account along with your normal user account. I setup both. If I need to use a terminal I can either use the Root terminal or the regular terminal. I generally just choose the Root terminal as it is simpler for me.

When I was using Ubuntu I become used to sudo and its graphical version gksudo so it didn't bother me. Now I use Debian I like being able to go straight to Root.

FredGSanford 03-06-2011 03:48 AM

I create a root acct and use su- to login as root, and exit out when done!

Hangdog42 03-06-2011 07:40 AM

You need a "both" option to your poll. If I've got a common one-off command I use a lot, I'll set it up in sudoers so I can use sudo. However, sometimes I need to do a variety of tasks, in which case I pop open a terminal and log in as root.

doomloard 03-08-2011 12:07 PM

i would much rather use sudo to gain admin rights on my servers for one main Reason if a admin staff member gets fired all i have to do is disable his account and remove him from the group that can use sudo but if i had to give users the root password that needed admin rights every time one left i have to change the password.

snowday 03-08-2011 12:22 PM

I also would like to see a "both" option added to the poll. "Carpenters, which do you use: a hammer or a saw?" :)

TobiSGD 03-08-2011 02:21 PM

I use su to do administrative tasks, and sudo for some tasks that are not really administrative, like mounting ISOs or reboot the system.

I personally find it a myth that a root account is a security risk. Crackers can only hack into your root account if you let them do that. That means that you have to have a running daemon that allows logins, for example SSH, and that it must be configured to allow root logins with a password.
Everyone that is aware of the risks would never allow root-logins with password, either it is disabled at all to login as root from a remote machine or only allowed with a GPG-key.

SL00b 03-08-2011 03:59 PM

I use sudo for everything, because "sudo bash" is the same as "su", only now I don't have to worry about knowing any password other than my own.

chrisretusn 03-08-2011 05:06 PM

Root is not the root of all evil.;)

I log as root all the time, especially on my server, most of what I want to do requires root privileges. I even on occasion startx from my root account. :eek:

Your poll left out "su -".

I use "su -" or when I feel like it, "su - root" most often when I am on my normal use machine running KDE and don't want to drop out to the CLI.

Every now and then I use sudo.

I voted "log in as root" even though I use three methods to gain root privileges; log in as, su -, sudo.

jefro 03-08-2011 08:02 PM

Then 11 people are not following best practices. Use only the lowest permission to do the job. sudo is that.

Now I do use su to change users.


All times are GMT -5. The time now is 11:41 PM.