It is difficult to enter the system by entering the user name and password when performing livecd. Therefore, we plan to skip these two steps.
1. Password verification omitted
Simply change root: X: 0: 0: Root:/root:/bin/bash in/etc/passwd to root: 0: 0: Root:/root: /bin/Bash, you can remove the X in it, so that the root user does not need a password. The same applies to other users.
2. the user name is omitted.
(1) Modify/etc/inittab
The following configurations are available in inittab:
1: 2345: respawn:/sbin/agetty tty1 9600
2: 2345: respawn:/sbin/agetty tty2 9600
3: 2345: respawn:/sbin/agetty tty3 9600
4: 2345: respawn:/sbin/agetty tty4 9600
5: 2345: respawn:/sbin/agetty tty5 9600
6: 2345: respawn:/sbin/agetty tty6 9600
Indicates that the system can have six consoles, and ALT + (F1 ~ F6. While/sbin/agetty is a login verification program. When it is executed, the user is prompted to enter the user name and password, and then start a specified shell (specified in the passwd file ).
Therefore, we only need to modify it to not execute agettty, but to execute a script compiled by ourselves, we can skip the user name and password input. Modify as follows:
1: 2345: respawn:/root/logintest tty1 9600
Here I place a test script in/root/, so that the script will be executed when the system starts. The script content:
#! /Bin/sh
/Bin/login-F Root
The script actually executes the login of a root user. If you have other requirements, you can add them to the script.