Login as root on ubuntu desktop:配置 /etc/gdm3/custom.conf

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.

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.

Appendix: /etc/gdm3/custom.conf

# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=me

# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false

# Enabling automatic login

# Enabling timed login
#  TimedLoginEnable = true
#  TimedLogin = user1
#  TimedLoginDelay = 10

[security]
AllowRoot=true
[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章