sudo visudo
#ALL=(ALL) NOPASSWD:ALL
gucloud ALL=(ALL) NOPASSWD: ALL
vim /etc/gdm3/custom.conf
TimedLoginEnable=false
AutomaticLoginEnable=true #设为true
TimedLogin=root #设成root
AutomaticLogin=root #设成root
TimedLoginDelay=10
AutomaticLoginEnable=true #设为true
AutomaticLogin=root #设为root
修改/lib/systemd/system/serial-getty@.service可使用串口root自动登录
#ExecStart=-/sbin/agetty -o ‘-p – \u’ --noclear %I $TER
ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM
https://blog.csdn.net/qq_44673299/article/details/108658078
https://blog.csdn.net/m0_46128839/article/details/116133371