vim /etc/gdm/custom.conf
[daemon]选项中
AutomaticLoginEnable=true AutomaticLogin=root TimedLoginEnable=true
[Security]
AllowRoot=true
CentOS 7 开机直接进入root
原文:https://www.cnblogs.com/xingxyx/p/12965549.html