1、自动登录:
(1)在/boot/grub的mune.lst里面添加autologin后就会以默认用户登录
(2)打开/etc/slim.conf,在
# for avoid pre-loading the username.
default_user tux
后面添加
auto_login yes
2、以text mode 登录
在/boot/grub的mune.lst里面添加screen=text即可。
在此基础上的自动登录:
打开/etc/inittab,可以看到
# /sbin/getty respawn shell invocations for selected ttys.
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
有六个模式,screen=text默认使用第一个,但是要验证用户名,密码,我们需要绕过它
修改 tty1::respawn:/sbin/getty 38400 tty1 为:
tty1::respawn:/sbin/autologin 38400 tty1
然后再在/sbin/下新建脚本autologin,代码如下:
#!/bin/bash
/bin/login -f tux