1. In boot grub select your top option and press e to edit.
  2. Go to the line of Linux 16 and change ro with rw init=/sysroot/bin/sh.
  3. Now press Control+x to start on single user mode.
  4. Now access the system with this command.
    chroot /sysroot
  5. Reset the password.
    passwd root
  6. Update selinux information
    touch /.autorelabel
  7. Exit chroot
    exit
  8. Reboot your system
    reboot