How to recover root password

works for me
but I add setenforce=0 after rd.break .

  1. Reboot server, at grub screen press e to edit.
  2. Go to end of the linux line and add rd.break setenforce=0
  3. Do CTRL-X to boot.
  4. Do mount -o remount,rw /sysroot
  5. Do chroot /sysroot
  6. Do passwd root
  7. Do touch /.autorelabel
  8. Do exit
  9. Do exit

tip - > maybe reboot take several time, continue awaiting