Use the sudo –i passwd root command. Set root password, when it asks. Add the “AllowRoot=true” line in the [security] directive in file /etc/gdm3/custom. conf file.
How do I enable root user in Ubuntu?
Steps mentioned below will allow you to enable the root user and login as root on the OS.
- Login to your account and open Terminal.
- sudo passwd root.
- Type in the new password for UNIX.
- sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf.
- At the end of the file append greeter-show-manual-login = true.
How do I login as root in Linux?
You need to set the password for the root first by “sudo passwd root”, enter your password once and then root’s new password twice. Then type in “su -“ and enter the password you just set. Another way of gaining root access is “sudo su” but this time enter your password instead of the root’s.