首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Login as root on ubuntu desktop

Login as root on ubuntu desktop

作者头像
一个会写诗的程序员
发布2022-09-30 08:08:42
1.8K0
发布2022-09-30 08:08:42
举报

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
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2022-09-29,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档