Login as root on ubuntu desktop
8,304
- 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. - Unlock the root account with
sudo passwd -u root
. - Edit
sudo nano /etc/gdm3/custom.conf
, and add the following line under[security]
:
AllowRoot=true
- 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
- Reboot.
- Select "Not Listed" at the login screen, then type "root" in the username field, and your root password in the password field.
- Now you should be logged in as root in your GUI desktop.
![Majoris](https://i.stack.imgur.com/pzd9N.jpg?s=256&g=1)
Author by
Majoris
Updated on September 18, 2022Comments
-
Majoris almost 2 years
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.
-
FedKad over 4 yearsDid 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 likeSystemAccount=false
in the[User]
section.) -
Rinzwind over 4 yearsplease 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
-
-
BrianBlaze almost 3 yearsIt'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.