ubuntu20.04启用root账户登录
1. sudo passwd root
2. sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
文件末新增2行
greeter-show-manual-login=true
all-guest=false
3. sudo vim /etc/pam.d/gdm-autologin
第三行注释
#auth required pam_succeed_if.so user != root quiet_success
4. sudo vim /etc/pam.d/gdm-password
第三行注释
#auth required pam_succeed_if.so user != root quiet_success
5. sudo vim /root/.profile
第九行注释,新增
tty -s&&mesg n || true
6. reboot