RHEL8 reset root password
Step 1: Restart the Linux system host and the boot interface appears, press the "e" key on the keyboard to enter the kernel editing interface, as shown in the following figure.
Step 2: Add the "rd.break" parameter to the end of the linux parameter line, and then press the "Ctrl + x" key combination to run the modified kernel program, as shown in the figure below.
Step 3: After about 30 seconds, enter the emergency mode of the system, as shown in the figure below.
Step 4: Enter the following commands in sequence, and then press the "Ctrl + d" key combination twice to exit and restart. After the system restarts again, you can use the new password to log in to the Linux system. The command execution effect is shown in the figure below.
mount -o remount,rw /sysroot
chroot /sysroot
passwd
touch /.autorelabel