- Reboot your Linux box and on the Linux Kernel boot screen press up or down arrow key to stop the Linux kernel from booting.
- Then select the kernel version for which you want to reset the password and press ‘e’ to edit the kernel parameter.
- After entering the edit mode look for the line linux16, move your cursor to the end of the line and enter “rd.break” as shown in below image and enter “CTLR + x” to reboot the kernel.
- Now run following command in sequence
- mount -oremount,rw /sysroot
- chroot /sysroot
- passwd root
- touch /.autorelabel
- Now set your your root password and enter “exit” twice to reboot your system.
- Now login with the new password you have set.