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.

7 comments:

  1. sir my question is, in my college we have staff and student login. Now consider, if i do the same steps mention above for student login then it will work or not?

    ReplyDelete
    Replies
    1. No, it won't work. Because, as I memtioned here that only 'administrator' is having the right to do so...

      Delete
  2. I was searching for this information. Thanks a lot...

    ReplyDelete
  3. i think ubuntu must add facility to have root account by default. even debian also have the same in it. redhat and fedora only creates root account at the time of installation.

    ReplyDelete
  4. Replies
    1. The same case is there for Debian based Linux. Mint and Ubuntu both are based on Debian. So, it is applicable to Mint also

      Delete
  5. This comment has been removed by the author.

    ReplyDelete