6

How do we turn on root desktop login? I set the root password then modified /etc/gdm3/custom.conf

[Security]
AllowRoot=true

This is not giving me the option of the root at login screen, neither it accepts my root credentials. Credentials are correct.

2
  • Did you try putting a new file called root to the directory /var/lib/AccountsService/users similar to your other normal user? (Note that there should be present a line like SystemAccount=false in the [User] section.)
    – FedKad
    Nov 29, 2019 at 11:37
  • 1
    please install a Linux that is designed for using root and is enabled by default. Ubuntu is designed as a sudo based system for a reason: to prevent mistakes
    – Rinzwind
    Nov 29, 2019 at 16:41

1 Answer 1

10
  1. Set a root password (may be the same as user password) with sudo passwd root. You'll be asked to type the password twice in case of a typo.
  2. Unlock the root account with sudo passwd -u root.
  3. Edit sudo nano /etc/gdm3/custom.conf, and add the following line under [security]:
AllowRoot=true
  1. Edit sudo nano /etc/pam.d/gdm-password, and comment out the following line by adding a # in front of it, like this:
#auth   required    pam_succeed_if.so user != root quiet_success
  1. Reboot.
  2. Select "Not Listed" at the login screen, then type "root" in the username field, and your root password in the password field.
  3. Now you should be logged in as root in your GUI desktop.
2
  • 1
    It's so frustrating I had to do this to run anything on this ubuntu machine that on any other ubuntu installation would ask me for authentication to open an application. For some reason it won't ask me so nothing will open or mount if it needs root password. Thanks for the work around.
    – BrianBlaze
    Aug 27, 2021 at 17:49
  • 1
    I was one step away from going to install Gentoo Linux. Thanks! Unlike all the other answers about this similar related question, only this one allowed me to log in as root into the GUI of my Ubuntu Linux Dekstop.
    – Joseph
    Sep 9, 2023 at 9:36

Not the answer you're looking for? Browse other questions tagged .