We all know that in most Linux System there are two basic types of accounts, it can be a normal user and super user.
What is the difference between normal user and super user?
Root User Account - a special account that includes a full access to any programs and files on the system.
Normal User Account - a user account that has access to his/her own home directory. Remember that programs and files that are accessible has been granted access to (by the root user).
Allowing normal user to do task with a privilege
Its log to a log file, where the system administrator can keep an eye in
Run the following command to find out exactly what
This could result in the following output for the example user “peter” on the “server1” host:
Matching Defaults entries for peter on server1:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User peter may run the following commands on server1:
What the last line means is that user can execute
Below are the list of
For the root user command, use the following syntax:
You may install the “git” version control software using apt-get package manager. You may try this without using
You would get this error message:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Adding the sudo command before our previous command, system will execute our command with the root user privileges:
sudo apt-get install git
You can use the -u option to run commands as a user, just use the following command:
sudo -u username command
You can run desktop (graphical windowing) applications as another user, use the gksu command.