Logging in, su, and the Root User
Unlike MS Windows where anyone can set down in front of the computer and view, edit, or delete any file on the hard drive (which is why Windows is so vulnerable to virus attacks) Linux is very security minded. Users MUST log in with a password and can access only the files they have permission for, this way no user can screw up the files or work of another user or worse, screw up the system itself. Linux was designed this way because it was intended as an operating system for network servers, routers, and firewalls where access must be limited.
There is one user on every Linux installation that has access to everything, this user is called "root", AKA super user, or system administrator. The root user is the only user that can edit the system configuration, add new users to the system, and perform other system administration tasks. The root account is created automatically when Linux is installed, all you need to do is provide a root password. Most installation programs give you an opportunity to create user accounts during the installation, if you did not do it or were not given the opportunity you should do it as soon as possible after installation, click here for instructions on adding users the system.
You may ask, if root is created automatically then why add another user, why not just use root? Ask any experienced Linux or Unix user and they will say root should be used ONLY WHEN NESSARY to perform system administration jobs, never log in as root when normal user will do. The main reason for this for the home computer and new Linux users is that it is very easy to trash your Linux operating system poking around as root. Put another way, while you are trying to figure out what that file is for or what this program dose, or how to copy, move, edit, and delete files you could accidentally wreck the system to the point that the only option is to reinstall. Whether it was an accident, a typing error, or temporary stupidity (it happens to all of us) it is no fun to start over from scratch after you spent hours, even weeks getting things working and setup just the way you like. When logged in as a normal user that can't happen because the system won't allow you to move, edit, or delete important system files. If we were talking about a network computer then there are security issues with root log ins, but I won't get into that here.
Ok, so I'm logged in as Doug and I need to edit /etc/fstab but I can't, the computer just says access denied? To edit system files or do other tasks that require root access you need to use su. You need the command prompt, so if you are in graphical mode just open a terminal window and type "su" without the quotes and press enter, you will be prompted for a password, enter the root password hit enter and you now have root access at this command prompt.
Another option is to use "sudo". To use sudo edit the file "/etc/sudoers" and give your user name the needed permissions. to do this add a line like,
Then at a command prompt you can enter sudo folowed by any command.
After you enter your password the command will be executed with the needed permission. In this example a directory named "temp" will be created in the /mnt directory
For more information see "man sudo" and "man sudoers".