How do I enable root login?

Linode Staff

I am utilizing the Ubuntu 18.04LTS full installation on my Linode. I am able to access the GUI via Glish, however there is no option at the login screen to log in directly as root. How can I allow that option?

3 Replies

Enabling the root login through the GUI is, fortunately, relatively simple. First, you will want to edit /etc/gdm3/custom.conf. You will want to look for the [security] block and add AllowRoot=true. It should look like this:

[security]
AllowRoot=true

From there, you can close the file and open up /etc/pam.d/gdm-password. Look for the following line:

auth    required    pam_succeed_if.so user != root quiet_success

Comment it out so it looks like this:

#auth    required    pam_succeed_if.so user != root quiet_success

From there, restart your Linode. Once it's back up, open up the Glish console again and you should see the option for a new user at the bottom of the list of users, or a "Not listed?" option. Click that, enter in the username "root" and the root password. From there, you should be good to go!

If you encounter any other issues, I would recommend reading the Ubuntu documentation on how to enable root login.

This did not work. After following all the steps given, there is no place to select an alternative User.

I wanted to dig into this to see if I could help, so I spun up an Ubuntu 18.04 Linode and did a full installation of Gnome on it. I then followed the steps given by @scrane in the post above, and it worked for me. When I clicked on 'Glish' through the 'Launch Console' option in the Dashboard, I was able to see my username and below it 'Not Listed?'.

I'm curious if you have any special settings that perhaps I didn't try. When you installed Gnome, did you add anything extra? Would you be able to give detail on the steps that you took to install it? We just want to see if there are any other factors that would be contributing to it.

The commands I ran to install Gnome on my Linode are as follows:

sudo apt install gnome-session gdm3
sudo apt install tasksel
sudo tasksel install ubuntu-desktop
sudo service gdm3 start

I rebooted my Linode, and it worked as expected.

Any more information you can provide would be helpful to assist in troubleshooting.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct