Root account is disabled by default in Ubuntu and it’s not recommended to enable it due to the security reason. You can use “sudo” command instead to get the root or administrator privilege. If you still want to enable login as root user in Ubuntu, this handy tutorial is going to show you how.
Enable root account by giving a password:
To get started, hit Ctrl+Alt+T, copy and paste this command into terminal and hit enter:
sudo passwd root
Input current user’s password, then input a root password twice. Typing in your password does not show in terminal, just blindly type in your password and hit enter.
Enable Login as Root account in LightDM:
Root account won’t shown as a user in Ubuntu LightDM login screen, so you need to manually type in username and password. To enable it:
Edit “/etc/lightdm/lightdm.conf” with this command:
gksudo gedit /etc/lightdm/lightdm.conf
Then add this line to the end and save the file.
greeter-show-manual-login=true
Now restart your computer, choose Login and type in root and password to login as root.
Enjoy!







very useful thanks.
mercie thanks shokran