1 – In the boot grub menu select option to edit.
2 – Select Option 1 to edit (e).
在第一行按e进入编辑模式
3 – Go to the line of “Linux ..." and change ro with rw init=/sysroot/bin/sh.
移动鼠标到最后一行
4 – Now press Control+x to start on single user mode.
5 – Now access the system with this command. >> chroot /sysroot
6 – Reset the password. with >> passwd root
7 – Update selinux information with >> touch /.autorelabel
dmesg或 tail -200 /var/log/messages 查看系统启动信息,找到有错误没启动成功的进程,ldd查看动态链接库
8 – Exit chroot >> exit
9 – Reboot your system >> reboot
参考:
https://unix.stackexchange.com/questions/358821/login-incorrect-on-centos
https://www.linuxtechi.com/boot-centos-8-rhel-8-single-user-mode/
[
本帖最后由 linda 于 2020-8-25 19:17 编辑 ]