4

I'm using Ubuntu 18.04 LTS on Vmware.

I followed these instructions: https://www.youtube.com/watch?v=pdyy7icpgbQ

But when restarting, I'm getting this: enter image description here

Instead of this:

enter image description here

... as shown in the video.

How to enable the login as root?


Additional

Here a video to show the process: enter image description here


After Conclusion step

enter image description here enter image description here

Solution

After a lot of support of Marmayogi, the best solution found was to keep lightdm, detailed here:

  • 3
    Please do NOT login as root. Debian/Ubuntu has it disabled by default for a good reason. –  May 06 '19 at 08:55

2 Answers2

5

How to Configure gdm3 to allow root login?

Ubuntu 18.04 comes with GDM (Gnome Display Manager) as a default Display Manager. For Security reason user can’t login with root user. For development and advanced operation, some user may prefer to login as root.

Follow the steps to enable root login on Ubuntu 18.04 GDM display manager.

Step-1: Modify GDM conf file.

Before doing any changes take a back up:

$ sudo cp /etc/gdm3/custom.conf /etc/gdm3/custom.conf.original

Now open up /etc/gdm3/custom.conf with vi editor as follows:

$ sudo vi /etc/gdm3/custom.conf

Copy and paste the following two lines below [Security] directive.

[Security]
AllowRoot = true
AllowRemoteRoot = true

Save and exit from the editor.

Step-2: Modify PAM conf file.

Now modify PAM (Pluggable Authentication Modules) configuration file.

Before doing any changes take a back up:

$ sudo cp /etc/pam.d/gdm-password /etc/pam.d/gdm-password.original

Now open up /etc/pam.d/gdm-password with vi editor as follows:

$ sudo vi /etc/pam.d/gdm-password

In the file, search for the following line:

auth    required    pam_succeed_if.so user != root quiet_success

To comment the line just add # in front of the line as shown below:

#auth   required    pam_succeed_if.so user != root quiet_success

Save and exit from the editor.

Note: This step was incomplete in the youtube link provided in the post by the Questioner.

Step-3: Reboot

After reboot, you will reach login screen where there will be a display of not listed? option just under username. If you click it, you will get another screen where you can enter root as username and then press next button. Now, the next screen appears which collects password. You enter root password. After successful authentication you will be logged in as root.

Conclusion:

Questioner @Rogério Dec attempts to look for username root from lightdm login screen.

This procedure is for gnome GDM according to the youtube video.

If you have not installed gnome desktop, then install the same using the following command:

$ sudo apt install ubuntu-gnome-desktop

If you have already installed both lightdm as well as gdm3, then you need to switch to gdm through following command:

$ sudo dpkg-reconfigure gdm3

After switched to gdm3, follow step-3 to login as root.

Marmayogi
  • 2,488
  • Thank you @Rogério Dec for pointing out path error in cp command. And also vi & gedit mixup. – Marmayogi May 06 '19 at 16:07
  • Thanks, I did your steps but it seems to have made no difference. To confirm the steps I performed, I posted a video on the original question so you can track what I may be doing wrong. – Rogério Dec May 06 '19 at 16:24
  • You are in lightdm whereas this root-login procedure is for gdm. So you need to switch to gdm for root-login to work. If you issue this command cat /etc/X11/default-display-manager, the ouput on your terminal will be /usr/sbin/lightdm. Suppose the output is /usr/sbin/gdm3, then the root-login process will work. Please follow up the Conclusion part of the answer in order to switch to gdm. If you have more questions, please let me know! – Marmayogi May 06 '19 at 16:45
  • Suppose you don't want to switch to gdm and you want continue with lightdm display manager and still want to do root-login. Then you should follow https://askubuntu.com/questions/451950/how-to-configure-lightdm-to-allow-manual-logins-in-ubuntu-14-04. A word of caution: this link offers solution for Ubuntu 14.04 lightdm but your version of ubuntu is 18.04. So, please double-check before using the solution. – Marmayogi May 06 '19 at 16:57
  • I did the "Conclusion" step, but now I can't log in anymore, even with my old user. I inserted 2 images at the end of the original post to illustrate. – Rogério Dec May 06 '19 at 21:45
  • I restored a backup from my virtual machine and redid the steps. I noticed that after sudo dpkg-reconfigure gdm3 I get gdm.service is not active, cannot reload. invoke-rc.d: initscript gdm3, action "reload" failed. – Rogério Dec May 06 '19 at 21:55
  • What's the solution you came to in chat? I have the same problem, and I can't login as root or my user through the GUI. However, I can login as either root or my user through open-SSH server or OpenVPN. Thanks! – Sean McCarthy Dec 16 '19 at 05:44
0

Another possible reason for this behaviour is that you haven't set a root password. I know the Ubuntu install should force this, but if for any reason it glitches, you can do the following in a terminal :

sudo passwd root

As described in this post : https://linuxize.com/post/how-to-enable-and-disable-root-user-account-in-ubuntu/

Grindlay
  • 101