Because it is not recommended doing so unless you know exactly what you are doing. Root is a superuser, meaning it can do anything and everything - it is only meant for administrative tasks. Day-for-day tasks can bear a security risk that WILL be exploited if EVERYONE (or a large proportion of users) used root. Think Windows - 99% of malware and virus problems are from people using admin accounts for everyday tasks.
Let's look at an example:
What if someone breaks into your system and tells it to erase your disks? If you are running as a normal user, the only files you would (should) be able to remove are those that belong to you, and not anyone else. If, say, you had other people using the computer, their files will not be touched at all, no matter how hard you try. That means you will not be able to change any system files, and therefore your system will remain rock-solid and unaffected/uninfected.
If you run as root, however, you can wipe the hard drive entirely, probably do some damage to the hardware itself, and generally render the system unusable. Correction: anyone who can get to run a single command as root on your computer (some malicious website or an email attachment) can do that.
Take a look this nice article that might explain it better than I did.
Here's another one.
You can always use sudo command
or gksu command
to run the command
as the superuser, both of those work with graphical and command-line utilities. sudo
is usually used for CLI, though, and gksu
is the graphical password promt that does the same thing.
To an extent, they let you become root
temporarily - much, much better than running as root constantly and risking instability.
I had the same issue. Changing, just a bit, Robin's answer solved the problem...
I've changed a little the steps suggested on: http://www.psychocats.net/ubuntu/fixsudo
- Boot in recovery mode as root
- Enter the command:
mount -o rw,remount /
- Enter the command:
groupadd admin
- Enter the command:
adduser username admin
- Enter the command:
sudo nano /etc/sudoers
- Right below
root ALL=(ALL:ALL) ALL
add this line username ALL=(ALL:ALL) ALL
- Press Ctrl+X and answer 'y' to save the changes
- Enter the command:
passwd username
- Enter your user's password
- Enter the command:
exit
- Resume normal boot
- You 've made it!!!!
*where username is your actual username.
Best Answer
It defeats the security model that's been in place for years. Applications are meant to be run with non-administrative security (or as mere mortals) so you have to elevate their privileges to modify the underlying system. For example, you wouldn't want that recent crash of Rhythmbox to wipe out your entire
/usr
directory due to a bug. Or that vulnerability that was just posted in ProFTPD to allow an attacker to gain a ROOT shell.It's just good practice on any operating system to run your applications on a user level and leave administrative tasks to the root user, and only on a per-need basis.