sudo passwd
sudo nano /etc/gdm3/custom.conf
Inside the GDM configuration file, we need to add the AllowRoot=true
line. After you have made this change, you can save and exit the file.
AllowRoot=true
sudo nano /etc/pam.d/gdm-password
Inside of the PAM authentication daemon file, comment out the following line, which denies root access to the graphical user interface, with a pound sign #
. You can save your changes and exit this file when done.
auth required pam_succeed_if.so user != root quiet_success
reboot
References
https://linuxconfig.org/how-to-allow-gui-root-login-on-ubuntu-22-04-jammy-jellyfish-linux