ubuntu20.04 使用root用户登录系统

第一步:

以普通用户登录系统,创建root用户的密码

在终端输入命令:

sudo passwd root

然后输入设置的密码,输入两次,这样就完成了设置root用户密码了

ubuntu20.04 使用root用户登录系统

第二步:

修改文件sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

在文件末尾增加如下两行:

greeter-show-manual-login=true

all-guest=false

ubuntu20.04 使用root用户登录系统

 

第三步:

修改 /etc/pam.d/gdm-autologin

/etc/pam.d/gdm-password

两个文件

sudo gedit /etc/pam.d/gdm-autologin

注释掉auth required pam_succeed_if.so user != root quiet_success这一行(第三行左右)

ubuntu20.04 使用root用户登录系统

sudo gedit /etc/pam.d/gdm-password

注释掉 auth required pam_succeed_if.so user != root quiet_success这一行(第三行左右)

ubuntu20.04 使用root用户登录系统

第四步:

修改/root/.profile文件

sudo gedit /root/.profile

将文件末尾的mesg n 2> /dev/null || true这一行修改成

tty -s&&mesg n || true

部分没有,可以不用修改

本文来自:七兮网络,原地址:https://qxhut.cn/?id=172

本站原创文章,作者:小 编,如若转载,请注明出处:https://www.mzbky.com/2137.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
小 编的头像小 编新注册
上一篇 2020年7月28日 下午10:29
下一篇 2020年8月12日 下午10:58

相关推荐

发表回复

登录后才能评论