0x01 使用root权限打开控制台并为root帐号创建密码
sudi -i passwd root
0x02 修改配置文件
打开/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf,在配置文件中添加"greeter-show-manual-login=true"和"all-guest=false"
gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
编辑/etc/pam.d/gdm-autologin,注释第三行"auth required pam_succeed_if.so user != root quiet_success"
gedit /etc/pam.d/gdm-autologin
编辑gedit /etc/pam.d/gdm-password,注释第三行"auth required pam_succeed_if.so user != root quiet_success"
gedit /etc/pam.d/gdm-password
编辑gedit /root/.profile
gedit /root/.profile
重启计算机即可用root帐号登录