All parties in the matter of Sudo v. Root Account please rise...
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Do you use sudo or the root account to gain root privileges?
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?
Last edited by Kenny_Strawn; 03-05-2011 at 07:59 PM.
Reason: Corrected title
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.
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.
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.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
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.
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.
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.
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.
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.
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.
Last edited by chrisretusn; 03-08-2011 at 05:10 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.