We are going to see How to Changing/ Recovering root user password in RHEL7/ CentOS 7 in this post
Boot the system and wait for GRUB menu. On some Operating systems, you need to disturb the booting by pressing any keys in your system.
Than press Ctrl+x to reboot your OS with specified option. Once rebooted, will get a shell prompt without credentials.
check whether the root filesystem has been mounted or not.
Mount the root filesystem with RW permission.
Now issue the “passwd” command to recover/change the root password. It will ask for the new password and re-enter the password for confirmation. Once provided the new password will receive the “Authentication token successfully updated”