Click to See Complete Forum and Search --> : Don't log in as root?
Badfrog66
01-22-2001, 12:15 AM
I've dutifully followed all the advice I've read here in the forums and in other places, and created my own user account, and never log in as root unless I'm doing something that I have to be root in order to do.
I'm not sure I understand the reasoning behind this rule, since I find myself having to log in as root (or su) all the blamed time in order to do whatever it is I'm doing at the time - installing software, editing some configuration script somewhere or otherwise generally poking around...
So why not just log in as root all the time?
The explanation I've gotten before goes along the lines of "root has the authority to do things that will destroy your system, so you should only log in as root when you have to". Well, I seem to always have to.
Should I just give my non-root user the superuser flag (in userconf, not su)? Wouldn't this be tantamount to logging in as root all the time, and then defeat the purpose of having a login other than root?
------------------
Huh? Use all free space? Yeah, sure, do that.
Doh!
wmHardRock
01-22-2001, 12:25 AM
what if by accident you type rm -rf / ? Under Windows, why do you always feel bad leaving your computer when someone unthrustworty is around?
manux
01-22-2001, 12:28 AM
if you don't mind re-installing, go ahead root away.
Ryeker
01-22-2001, 12:38 AM
It depends what you use your Linux box for. If you are the casual desktop user, going around doing your things, being root really would be a security hazard. So many things could go wrong. You accidently saved over a file and such.
I use Linux on my servers where I am normally doing admin stuff, thus needing root. I still use my regular login to compile things, grab stuff off the Internet, etc.
I'm guessing this is something you'll learn when something bad happens... http://www.linuxnewbie.org/ubb/smile.gif
------------------
ryeker@yahoo.com
Craig McPherson
01-22-2001, 12:47 AM
You shouldn't need to be "installing software" and "editing configuration files" all the time once you've finished setting your system up. While you're still learning about Linux and setting things up, you'll need to use root quite often, but once things are running properly you'll find you don't have to.
You never need to log in as root at all -- whenever you need to do something as root, just use the "su" command, type the root password, do what you need to do, and immediately type "exit" to switch to your normal shell.
Another option I like to do is to log in as root on tty1, and log in as my user account on tty2. I do all my work on tty2 until I run into something that I need root privs for, in which case I switch to tty1, do what I need to do, and immediately switch back to tty2.
If you get in the habit of doing things as root, you'll eventually fall victims to viruses and worms -- there are few Linux viruses now but that'll change. As a normal user, if you run a virused program, the worst it can do is kill your home directory (which you should make a backup of as root that the user account can't access, in case that DOES happen), or lock things up and require a reboot -- but after you reboot and restore any damaged files from your read-only backup, you're fixed.
If you run the virused program as root, your system and everythign on it is dead -- end of story.
Mazarin
01-22-2001, 01:44 AM
Non-super users are for surfing the internet, word processing, etc...
root is just for installing software, things like that. The big problem with windows now is that you are always root, and the script kiddies always love to mess with people on windows.
now you know why. http://www.linuxnewbie.org/ubb/smile.gif
Wonock
01-22-2001, 02:07 AM
NO!
twofoolish2b
01-22-2001, 08:17 AM
I think that if it's your home system you can do what ever you want to do with it. Now if it's your system at work, then that's a hole different story. Just think before you do it.