Linux7 root password cracking

1. Start the system, press e to enter, find the line linux16, add rd.break at the end of the line, (if there is no console=tty0, add it)

2. After the modification is completed, ctrl+x restarts and enters single user mode

3.mount -o remount,rw /sysroot

chroot /sysroot

echo "password" | passwd stdin root

touch /.autorelabel /selinux to relabel the system

4. Exit and restart the system

Guess you like

Origin blog.csdn.net/zjc801/article/details/86089389