Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-26-2003, 06:16 PM   #1
Registered: Feb 2003
Location: Culpeper,Va
Distribution: Mandrake 9.2 Knoppix 3.3 SuSe 9.0
Posts: 140

Rep: Reputation: 15
What is so dangerous about using root?

as my primary Desktop??, I know I can damage the system, but how exactly? Do some of you experts use root primarily, I bet you do.
Old 02-26-2003, 06:19 PM   #2
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
No we don't - one wrong command, one runaway program and your files are gone.

.. and additionally accounts like "merlin" or "tux" are much more fun :-)
Old 02-26-2003, 06:45 PM   #3
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Besides damage to your own system, you can affect others on the network / internet. If you always use root, your computer can be used as a point of attack on others.
Old 02-26-2003, 06:53 PM   #4
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
I'm no expert, but no, I never use root as a login... never, never, never. If I need to do something with root priviledges, I'll use su, issue the command, and exit from su.

I'm deathly afraid of developing scripts as root, especially if I want them to remove files. There's no telling what system files your script could kill while you're debugging it.

Besides that, if you're root and come across the rare linux virus, any command could get infected (ls, cp, mv, ps...) because any process you launch has write priviledges to those commands. Not using root access all the time is why linux is far less susceptible to viruses than Windows.
Old 02-26-2003, 07:42 PM   #5
Registered: Feb 2003
Location: Birmingham, UK
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222

Rep: Reputation: 30
Here's a great reason not to use root - as a normal user, type this:

rm -rf /home/frontier1

but 'accidentally' put a small space between the first forward slash and 'home'. Now do this as root.

Actually don't do this as root. It will delete Linux, any mounted filesystems and your partition table. And all because you missed a space out.

On it's own, this fact is a good reason not to be root all the time.

Old 02-26-2003, 07:48 PM   #6
Registered: Feb 2003
Location: Culpeper,Va
Distribution: Mandrake 9.2 Knoppix 3.3 SuSe 9.0
Posts: 140

Original Poster
Rep: Reputation: 15
Whoa! I had no clue, thanks guys, changing over to my user account from now on, again thanks!
Old 02-26-2003, 08:35 PM   #7
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Yes, the famous "rm -rf /" command probably isn't the best to run as root

Also, I learned my lesson a while ago when I accidentally tried to rm -rf a folder that didn't exist and ended up deleting another folder altogether.
Old 02-27-2003, 04:17 AM   #8
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
but why would you want to be called "root" it's a horrible username anyway....
Old 02-27-2003, 04:57 AM   #9
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
I'm root sometimes. I use root to see how bad I can break my system, and then try to fix it, or recover it. Just for fun.

Not really I'm not that geeky... yet.

Old 02-27-2003, 10:07 AM   #10
LQ Newbie
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 28

Rep: Reputation: 15
I did an "rm -fr /msdos" a few years back on my Linux box and wiped out my Windows 95 stuff (some might say that was a good thing), but it contained all of my expense records, etc and it was really maddening to try to recover it.

root is dangerous, since that experience I always sit on my hands first before I execute commands such as halting, rebooting, deleting, because you just never know....
Old 02-27-2003, 01:47 PM   #11
Registered: Feb 2003
Location: FL
Distribution: Mandrake 9.0
Posts: 58

Rep: Reputation: 15
I was new and fresh to linux about a year ago... I had no idea what I was doing. I completely taught myself everything I knew by trial and error. I always used root... and found out the hard way that it wasn't right. I ended up having to reinstall Mandrake 6 times completely before I stopped using root.
Old 02-27-2003, 02:50 PM   #12
Registered: Feb 2003
Location: Texas
Distribution: slackware 11
Posts: 90

Rep: Reputation: 15
for me, I only have to su maybe 2 or 3 times a day anyway, my normal "work"load doesn't require me to be logged in as root. why run the risk when I'm not really gaining anything except maybe 20 seconds of typing ?
Old 02-28-2003, 06:42 AM   #13
LQ Newbie
Registered: Feb 2003
Location: Bristol UK (53rd State of America)
Distribution: RH 8 Gnome / KDE
Posts: 22

Rep: Reputation: 15
Can you Help

After reading this posting as a newbie I understand now why not to log on a root many thanx to all for this info

Just one question arises from this how do I export all of the setting that I have set up under Root to my User account.

Sorry if this seems a bit dumb but after working for far too long with Microsoft Bloatyware for so long I have become lazy in my ways
Its probably something so obvious that I missed it
Duhhh Microsoft made me stupid
Old 02-28-2003, 06:58 AM   #14
Registered: Feb 2003
Location: Birmingham, UK
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222

Rep: Reputation: 30
substitute 'paul' for your username, and do it like so:

mv /root/.* /home/paul/ &&
chown -R paul.paul /home/paul/*

and that's it.
Old 02-28-2003, 10:21 AM   #15
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Also if you are working in a desktop environment, browsing the internet or chatting online root is dangerous. One time I tried to use X-Chat as root and it gave and error message saying something like "Running X-Chat as root is stupid....Don't do it!"

See if you get messed with while logged in as JoeSchmoe its tuff for an attacker to get anything done because JoeSchmoe doesn't have a lot of control over the system. If they get you as root...well you'll get rooted!


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dangerous Permissions? rob_roman23 Linux - General 4 10-21-2008 11:31 AM
Dangerous Religion danimalz General 692 02-07-2006 04:36 PM
is this dangerous? Kendo1979 Linux - Security 3 05-18-2005 12:31 AM
how dangerous is having a root terminal open? slackist Linux - Security 6 05-04-2004 06:55 AM
Is Knoppix dangerous? Ander Linux - Newbie 9 04-18-2003 02:05 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:19 PM.

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