last day (21 days later) » 

1:32 AM
1
A: Can't enable root login on Ubuntu 18.04

Marmayogi 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 l...

 
Thank you @Rogério Dec for pointing out path error in cp command. And also vi & gedit mixup.
 
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.
 
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!
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 askubuntu.com/questions/451950/…. 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.
 
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.
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.
 
Hello @Rogério Dec
I noticed the addition of two images. The first image is the one needed. There is a not listed? under username. If you click, then you should get a screen which allows you to type any username. There you should type root. Click next button. Then in the subsequent screen enter password. That is it!
I am not sure where you are stuck. Please give more details after clicking not listed? option.
You also mentioned that the execution of command sudo dpkg-reconfigure gdm3 threw error. Please run cat /etc/X11/default-display-manager and find out what is the current display manager set in in the system.
As pointed out in the Conclusion, you must run sudo apt install ubuntu-gnome-desktop command to install GDM first because I am not sure whether Gnome GDM is already installed in your system.
Running command sudo dpkg-reconfigure gdm3 is important because this command sets gdm3 in your system over lightdm. Subsequently, you can do the process of root-login without any problems.
 
 
1 hour later…
3:10 AM
Hello @RogérioDec
 
 
13 hours later…
4:26 PM
@Marmayogi Thanks, after making all steps (before reboot), cat /etc/X11/default-display-manager shows /usr/sbin/gdm3. After restarting, as the images posted, the interface is indeed new. Trying not listed?, inserting username root and the root password I also get Sorry. That didn't work message. The same if I try with the current username rogerio, ie, can't login anymore, just restoring a backup.
 
4:47 PM
Hello @RogérioDec
After root-login what exactly happened @RogérioDec?
Could you login? Was there any error message?
What was it?
 
5:05 PM
@Marmayogi I did not understand. According to the images, you can see that I can not login, either as root or any other user.
 
Did you install Ubuntu 18.04 normally or is it VM?
Are you there @RogérioDec?
 
Vmware
 
Fine!
I think it intalls Unity desktop.
You must install using default Gnome GDM desktop.
 
I'm sorry, this was not to give so much work, it was just to be a facilitator, but since this is quite complex, let's leave it as it is okay?
I appreciate your willingness to support me.
Thank you.
 
Then all the problems will be solved in one go!
Please don't give up.
It is not complicated.
You have already an image of Ubuntu 18.04 and this time you have to make sure you install Gnome GDM.
 
5:15 PM
I actually needed a Linux virtual machine just to be able to edit my wordpress sites faster because creating online within a provider is often very slow due to internet traffic.
 
I understand!
Is your VMware free? where did you download from?
 
Actually I'm already getting it, but many restrictions on access to folders have messed up the workflow, so I wanted to sort this out once and for all by leaving the user as root.
 
Please recall that I gave another suggesstion.
You can do root-login from lightdm also.
 
True, I will try this.
 
But procedure is different
Let me attempt to find out a working solution suitable for 18.04 lightdm.
 
5:19 PM
Unfortunately, at this very moment I can not because I'm in another activity, so I'll give you an answer later. Thank you again.
 
Please hold your horses
Tell me when are free
in another 5 hours or 10 hours
Give me little time to look for the correct solution.
and I shall intimate you through chat session.
 
You're very kind. I believe that in 5 hours I will be able to resume this subject.
 
What do you say @RogérioDec?
Fine! Let me give procedure for lightdm as soon as ready!
See you @RogérioDec
 
Thank you. See you later.
 
 
2 hours later…
7:52 PM
Hello @RogérioDec
Here are the instructions for root-login for Ubuntu 18.04 Unity desktop with lightdm display manager.
Before doing any change take a backup copy.
sudo cp /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf .original
Now you any editor to open up file /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
There will be two lines which you will observe as follows:
[Seat:*]
user-session=ubuntu
Now append the following new line in the file:
greeter-show-manual-login=true
Now save and exit editor.
Now reboot your system
After reboot, you will reach login screen where there will be a display of Login option just under password filed.
If you click it, you will get another screen where you can enter root and then hit <return> key.
Subsequently, you will be asked for password.
You enter root password.
After successful authentication you will be logged in as root.
To confirm the logged in as root user, type Ctrl+Alt+T and open up a terminal and then run the following command:
# whoami
root
You will observe that the output of the command will be root
I tested this on my Ubuntu 19.04 desktop system and found to be working fine!
I believe that your problem will be solved with this solution.
Good Luck, @RogérioDec!
 
 
2 hours later…
10:14 PM
@Marmayogi Thanks, it worked! But after the correct root login, I get this error message: i.imgur.com/Nfj0h1n.png
 

  last day (21 days later) »