Thursday, September 13, 2012

Creating 'root' in Ubuntu



The users of the Ubuntu system are aware that generally when you install the operating system on your PC, it doesn’t ask for the ‘root’ password. It doesn’t mean that Ubuntu system doesn’t contain the root! Ubuntu installation asks for the name of the administrator and its password. You can login to this account as general administrator user. As all we know that ‘root’ is the supreme user of the computer system. So, only ‘root’ has super-rights of your computer. Look at the diagram below that shows the relation among three different kinds of users of the Ubuntu.

Account types in Ubuntu

The ‘root’ is superuser. All major supervisor activities can be done through root. It does not ask for the password for these superuser activities! The ‘admin’ is administrator account. It can do many administrative tasks but asks password for it. It has limitations in supreme user activities. The ‘limuser’ is limited user account. It requires the admin or root password for many activities. So its name is limited user. It can’t do any administrative work! Most importantly, its entry is not mentioned in sudoers file. That is, it cannot execute command like ‘sudo’ (i.e. Super User DO). In such cases we need to switch temporarily to ‘root’ using ‘su’ command.

If Ubuntu doesn’t contain ‘root’ by default, then how to create it? The picture below shows the creation process of root.

Creating a 'root'
1.      Login to your administrator account and open terminal.
2.      Execute following command:

sudo passwd root

3.      It will ask for current user password. Then type it.
4.      After this the password for the root (new UNIX password) will be asked twice! Type the password twice and your ‘root’ account will be created.
5.      Now, you may use ‘su’ command to temporarily switch to ‘root’ account.
6.      Or, logout current account and go to ‘other’ account login window where you need the type both ‘root’ and its password too!
7.      After this you will get complete control of your Ubuntu system.