LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Poll: Do you use sudo or the root account to gain root privileges?
Be advised that this is a public poll: other users can see the choice(s) you selected.
Poll Options
Do you use sudo or the root account to gain root privileges?

You must log in and have one post to vote in this poll. If you don't have an account, you can register here.
Results will be available after the polls close.

The nominees are:

sudo
log in as root

Reply
 
Search this Thread
Old 03-05-2011, 04:05 PM   #1
Kenny_Strawn
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
Blog Entries: 62

Rep: Reputation: 55
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 08:59 PM. Reason: Corrected title
 
Old 03-05-2011, 04:40 PM   #2
Kenny_Strawn
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
Blog Entries: 62

Original Poster
Rep: Reputation: 55
What are the detailed explanations for your votes, those besides me who voted?
 
Old 03-05-2011, 07:49 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Archbsng does have a sudoers file, why can't you use it?
 
Old 03-05-2011, 08:02 PM   #4
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Rep: Reputation: 51
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.
 
Old 03-05-2011, 08:20 PM   #5
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 147Reputation: 147
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.
 
Old 03-05-2011, 10:54 PM   #6
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 8,221

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
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.
 
Old 03-05-2011, 11:27 PM   #7
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
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.
 
Old 03-06-2011, 04:48 AM   #8
FredGSanford
Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia Cauldron & Salix 14
Posts: 943
Blog Entries: 5

Rep: Reputation: 88
I create a root acct and use su- to login as root, and exit out when done!
 
Old 03-06-2011, 08:40 AM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
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.
Old 03-08-2011, 01:07 PM   #10
doomloard
LQ Newbie
 
Registered: Mar 2011
Posts: 14

Rep: Reputation: 0
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.
 
Old 03-08-2011, 01:22 PM   #11
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,921

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
I also would like to see a "both" option added to the poll. "Carpenters, which do you use: a hammer or a saw?"
 
Old 03-08-2011, 03:21 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,650
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
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.
 
Old 03-08-2011, 04:59 PM   #13
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
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.
 
Old 03-08-2011, 06:06 PM   #14
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 508

Rep: Reputation: Disabled
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 06:10 PM.
 
Old 03-08-2011, 09:02 PM   #15
jefro
Guru
 
Registered: Mar 2008
Posts: 12,073

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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.
  


Reply

Tags
root, sudo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo cd /root gives 'sudo: cd: command not found'. stf92 Linux - Newbie 4 03-03-2012 10:05 AM
After improper shutdown, 1 user can't startx (KDE), sudo, OR su. Root account is ok! ShellyCat Linux - Desktop 2 09-19-2010 04:56 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 08:56 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM
Want2use /sbin cmds undr non-root account w/o sudo. Is it safe 2 add /sbin 2 my PATH? kornerr Linux - General 4 02-25-2005 10:29 AM


All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration