执行sudo vim /etc/pam.d/gdm-password注释掉 auth required pam_succeed_if.so user != root quiet_success这一行(第三行左右)
#%PAM-1.0
auth requisite pam_nologin.so
#auth required pam_succeed_if.so user != root quiet_success
@include common-auth
auth optional pam_gnome_keyring.so
@include common-account
2.2:修改/root/.profile文件
执行sudo vim/root/.profile修改配置文件如下:
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
tty -s && mesg n || true
mesg n || true