Oh no ! You have forgot or mistyped your root password on Centos 8 what do we do ?
Boot to the grub menu
Go to the line which beings with “kernal auto” press “CTRL+E” to go to the end of the line and insert rd.break, we then need to press “CTRL-X” to reboot into Centos 8
By default the mount points is mounted with read only access – we need to change this. We will need to remount sysroot with read and write privileges to do so we can run the below commands.
mount -o remount,rw /sysroot
We then need to chroot to the sysroot directory
Finally we reset the password using the below command.