linux跳过用户名密码登陆界面方法

使用的是CentOS 6.5环境

 先修改 /etc/init/tty.conf文件

 exec /sbin/mingetty  --autologin root $TTY
红色为增加内容


在修改/etc/gdm/custom.conf 文件

修改[daemon]选项

AutomaticLoginEnable=true

AutomaticLogin=root

TimedLoginEnable=true

修改[security]
AllowRoot=true


下面是修改之后,重启后的文件

[root@localhost etc]# vi /etc/gdm/custom.conf 
# GDM configuration storage

[daemon]
AutomaticLoginEnable=true

AutomaticLogin=root

TimedLoginEnable=true

TimedLogin=root

TimedLoginDelay=7

[security]
AllowRoot=true

[xdmcp]

[greeter]

[chooser]

[debug]

这种方法不是每次都成功,有的root用户不行,换成其他用户就可以。只是做一下参考

猜你喜欢

转载自blog.csdn.net/sstya/article/details/47337755
今日推荐