Steps
Step1 – In the boot grub menu select option to edit.

Step2-Select Option to edit (e).

Step3-Go to the line of Linux16 and change ro with rw init=/sysroot/bin/sh.

Step4-Now press Control+x to start on single user mode.

Step5-Now access the system with this command. Type
#chroot /sysroot
Step6-Reset the password by typing command
#passwd root
#touch /.autorelabel
Step7-Update selinux information
Step8-Exit from chroot type
#exit
Step9-Reboot the system
#reboot
Done.