How to Create Root User in Ubuntu Server


I Have just installed Ubuntu Server 14.04 on VirtualBox. But during the installation I was never asked to create root user account. So how do I create root user in Ubuntu Server?


You don’t have to Create root user account because it is automatically created during the installation, The only thing is there is no password by default. So what you have to do is set a password to root user using sudo command as shown below.

sudo passwd root

First, you will be asked to enter your own password, then you will be prompted to type the new root password twice as below image shows.

Create Root User Ubuntu

And, do not forget sudo, otherwise you are most likely to receive following error message.

passwd: You may not view or modify password information for root.

Once you setup the password you can login as root user.