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

来源:互联网 发布:好书推荐 大数据 编辑:程序博客网 时间:2024/05/16 19:47

使用的是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=trueAutomaticLogin=rootTimedLoginEnable=trueTimedLogin=rootTimedLoginDelay=7[security]AllowRoot=true[xdmcp][greeter][chooser][debug]

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

0 0
原创粉丝点击