Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
|
View Poll Results: Do you use sudo or the root account to gain root privileges?
|
|
sudo
|
  
|
43 |
50.00% |
|
log in as root
|
  
|
43 |
50.00% |
 |
|
03-05-2011, 03:05 PM
|
#1
|
|
Senior Member
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Rep:
|
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
|
|
|
|
03-05-2011, 03:40 PM
|
#2
|
|
Senior Member
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Original Poster
Rep:
|
What are the detailed explanations for your votes, those besides me who voted?
|
|
|
|
03-05-2011, 06:49 PM
|
#3
|
|
Moderator
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,088
|
Archbsng does have a sudoers file, why can't you use it?
|
|
|
|
03-05-2011, 07:02 PM
|
#4
|
|
Member
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 467
Rep:
|
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.
|
|
|
|
03-05-2011, 07:20 PM
|
#5
|
|
Member
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Rep: 
|
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.
|
|
|
|
03-05-2011, 09:54 PM
|
#6
|
|
Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian
Posts: 5,350
|
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.
|
|
|
|
03-05-2011, 10:27 PM
|
#7
|
|
Senior Member
Registered: Feb 2011
Location: Australia
Distribution: Debian Sid/Experimental
Posts: 1,819
|
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.
|
|
|
|
03-06-2011, 03:48 AM
|
#8
|
|
Member
Registered: Nov 2005
Location: USA
Distribution: Mageia Cauldron & Salix 14
Posts: 939
Rep:
|
I create a root acct and use su- to login as root, and exit out when done!
|
|
|
|
03-06-2011, 07:40 AM
|
#9
|
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,756
|
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.
|
|
|
1 members found this post helpful.
|
03-08-2011, 12:07 PM
|
#10
|
|
LQ Newbie
Registered: Mar 2011
Posts: 14
Rep:
|
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.
|
|
|
|
03-08-2011, 12:22 PM
|
#11
|
|
Senior Member
Registered: Feb 2009
Posts: 3,138
|
I also would like to see a "both" option added to the poll. "Carpenters, which do you use: a hammer or a saw?" 
|
|
|
|
03-08-2011, 02:21 PM
|
#12
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 12,171
|
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.
|
|
|
|
03-08-2011, 03:59 PM
|
#13
|
|
Member
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375
Rep: 
|
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.
|
|
|
|
03-08-2011, 05:06 PM
|
#14
|
|
Member
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 409
Rep: 
|
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.
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.
|
|
|
|
03-08-2011, 08:02 PM
|
#15
|
|
Guru
Registered: Mar 2008
Posts: 8,534
|
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.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:34 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|