自动登录linux系统

来源:互联网 发布:淘宝优惠券链接淘口令 编辑:程序博客网 时间:2024/04/27 19:27
auto login linux system

1. set grub timeout 3
This means that boot will continue after 3 seconds.

2. remove root account
vi /etc/passwd

In this line
root:X:0:0:root:/root:/bin/bash,

remove the second segment. This line will become as belows.

root::0:0:root:/root:/bin/bash

vi /etc/shadow

In this line
root:!^&#*@(&#*&:14125:0:99999:7::1,

remove the second segment. This line will become as belows.

root::14125:0:99999:7::1

3. auto login as root

vi /etc/inittab

find this line:

0:2345:raspawn:/sbin/mingetty console

change this line as below.

0:2345:raspawn:/sbin/mingetty --autologin root console

reboot the linux host, root will boot automatically.




0 0