If for some reason, you need to enable the root account, all you need to do is to set a password for the root user. In Ubuntu, you can set or change the password of a user account with the
To change the root password you need to run the following command as a sudo user:
sudo passwd root
You will be prompted to enter and confirm the new root password.
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
That’s all! Now you can login to the Ubuntu system as a root. This is not the recommended way. You should always use a sudo user account instead.