Reset root password in CentOS 7 / RHEL 7
There may be some occasion you will end up with requirement to reset the root password, the occasion comes when you forget root password; follow this guide to reset the password of root. In CentOS, single user mode will help us to achieve our goal of resetting root password.
Boot your system in to single user mode.
chroot your system
reset the root password.
Update SELinux information.
Reboot your system.
Login with new password.