Ubuntu允许root默认登录

1.先给root用户设置好密码

2.vi /etc/lightdm/lightdm.conf
编辑:设置autologin-user=root

3.vi /root/.profile

注释掉mesg n || true,并且新添加一行:tty -s && mesg n

18.4:

4.vi /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

添加:
greeter-show-manual-login = true
all-guest = false

5.vi /etc/pam.d/gdm-autologin
删除或注释:
auth required pam_succeed_if.so user != root quiet_success

6./etc/pam.d/gdm-password
删除或注释:
auth required pam_succeed_if.so user != root quiet_success

7.重启,选择未列出,输入root及密码登录

你可能感兴趣的:(linux,笔记)