LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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


Reply
  Search this Thread
Old 11-01-2007, 08:14 AM   #1
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
root user


By default root (UID 0) is the most powerful user on the system. The general rule of thumb is to tell new users to only use the root ID when necessary. I take exception to that rule.

I started in unix over a decade ago and have always logged in and su'd to root and stayed there for everything. As a system admin root is needed for most of what I do anyway, but I can see the confusion by new users about when to use root and when not to use it. I feel it would be easier to advise them to use root all the time but be careful.

How about you, do you su to root as soon as you log in, or do you log in directly as root and stay with that ID through your session?
 
Old 11-01-2007, 08:30 AM   #2
dickgregory
Member
 
Registered: Oct 2002
Location: Houston
Distribution: Arch, PCLinuxOS, Mint
Posts: 257

Rep: Reputation: 34
I'll stick with the rule of thumb. Yes, a sysadmin needs to use root capabilities a lot more than a casual user. If that's all you do, you are ok staying as root.

But that's for you as sysadmin. Advising users to run as root can cause real trouble. Remember that most users scatter themselves across the whole internet world where lots of crackers lurk.

If you think that your users are not capable of understanding when to use or not use root, you should have them never use it. Change the root password and don't tell them what it is. Then you do all their sysadmin work. If they can't figure out when not to use it, they also won't be able to keep themselves safe from the wolves.
 
Old 11-01-2007, 08:44 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Systems are created with a distinction between "root users" and "regular users" for a very good reason. The average USER of a computer could get in big trouble by having root powers.

I would simply turn the question around: A typical user is going to get comfortable with a system and then eventually find they need to take on root powers to configure something. The presumption in the "conventional" setup is that they feel they are in enemy territory when running as root---and want to get out ASAP. That's part of the protection from mistakes. I submit that changing this standard practice has no real benefit--only increased risk.
 
Old 11-01-2007, 09:52 AM   #4
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
I'm speaking only for the new linux user working on his own desktop. A one user system. New users get stuck in so many different areas and get confused when they do and don't need root. Being root most of the time could remove those hurdles. I feel it might help lower the new user frustration level. And make them understand that with power their are consequences.
I once saw a fellow admin issue a rm * command not knowing he was n the / dir. Whooops. Blew everything away. He tried to control C but it was too late. Reload the OS and hope you have a good backup at that point.

I agree 100% about users on a server. I will not give root to any of them unless they are a fellow sysadmin.
 
Old 11-01-2007, 01:33 PM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
I would say "stay away from root".

Just a lack of concentration (resulting in a typo) has resulted in .c files being destroyed instead of .o files and a days work down the drain; this as a regular user.

Similarly I accidently pressed the spacebar while typing an rm -r command separating the character '/' from the rest of the filename; thank god I was not root at that moment because it would have wiped the system clean.
 
Old 11-01-2007, 01:51 PM   #6
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
In a multiuser system nobody should know root password except SysAd. Besides that the users should not be able snooping at each other private directories, they can inadvertently corrupt the system. And if the system connected to the outside word, making root public knowledge is an invitation for the hackers.

If it is necessary - employ 'sudo' for selected users, enabling them to execute few privileged commands.

Even in a single user system, there's no a really good reason to be root all the time. Regardless of years of experience everybody makes mistakes, and being a root it might be a fatal one.

Last edited by rsashok; 11-01-2007 at 01:53 PM.
 
Old 11-05-2007, 01:37 PM   #7
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
I agree it is not to be taken lightly ... but mistakes made like that are not easily forgotten ...so you learn from them.
 
Old 11-05-2007, 04:18 PM   #8
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
I am a sysadmin. I spend as little time in root as I can. I leverage groups and acls to minimize the time I have to be root. I also make extensive use of sudo and su (as we disable root logins over ssh).

Right now I'm on an ubuntu box as my primary workstation. The only times I ever become root on my local system are when I'm mounting and unmounting miscellaneous devices, editing apache/samba/other service configs for my various test installs, or installing updates.

If I, as a professional sysadmin, can spend something like 80% of my time as a non-root user, I should think that you, as someone who's not randomly mounting and unmounting shares and volumes or constantly testing various software would have even less of a need for it. And in the case of both the debian and redhat families, it'll tell you pretty unambiguously when you try to do something that needs root.

I don't honestly see a problem with living as a user in linux. The principle of least privilege seems to be pretty easy to adhere to.
 
Old 11-06-2007, 07:36 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Point a pistol straight at your foot and pull the trigger.

Go ahead. Try it.

"Since you are 'root', with all powers in all of computerdom," then You (with the capital-"Y" appropriate in reference to Deities) have the full and unquestioned authority to pull that trigger and the computer will obediently carry out anything that You ask.

Congratulations: "Y"ou have just blown-off your own foot.

"Oops?" you say? "I didn't mean to do that?" Tough-cookies. "Y"ou just did it.

----

This is exactly why those of us who possess the unquestioned and unquestionable right to command this-or-that computer system to do this-or-that, and to be obeyed, studiously and determinedly avoid exercising that power whenever possible. We not only do not "log on as 'root'," we set-up various limited accounts for ourselves and switch among them depending on what we are doing at the time!

Even though, at any time, we could log on as 'root' and, you know, "feel the power..."

A computer, after all, is just a machine ... and machines are dumb. If you, when logged on as 'root', tell a Unix/Linux system to delete every single file in the system (including "Linux itself"), it will do it! And as a consequence, you will be "scro-o-o-o-oo'd!"

So, that's why you consciously limit your own powers. When the computer knows to treat "Y"ou as "just an ordinary mortal," it protects you ... from yourself.

And if you don't believe me, just wait until you must explain to your [boss | spouse | favorite person of the opposite sex | pet poodle] why you must now spend your entire weekend mopping-up from the consequences of the fact that you accidentally told your computer to do an incredibly-stupid thing and it did it...

---
(Show of hands, please, from the Peanut Gallery? Thank you. Yeah, me too...)
 
  


Reply



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
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 08:36 PM
Scanner to work as USER and not forced as ROOT Root (Suse 9.1) 1kyle Linux - Hardware 0 07-10-2004 08:51 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 04:14 PM
Why does kppp.desktop require root userid for non-root user? rdaves@earthlink.net Linux - Networking 4 08-27-2001 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:56 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
Open Source Consulting | Domain Registration