需要修改两个文件 /etc/pam.d/gdm-autologin
/etc/pam.d/gdm-password
,将其中的
auth required pam_succeed_if.so user != root quiet_success
行注释掉即可。
# grep root /etc/pam.d/gdm-password /etc/pam.d/gdm-autologin
/etc/pam.d/gdm-password:#auth required pam_succeed_if.so user != root quiet_success
/etc/pam.d/gdm-autologin:#auth required pam_succeed_if.so user != root quiet_success