1. เข้า boot grub menu select option to edit.
2. Select Option to edit (e).
3. – แก้ ro และเพิ่ม rw init=/sysroot/bin/sh.
4. ออกโดยกด Control+x ทำการ start on single user mode.
5. Now access the system with this command.
chroot /sysroot
6. Reset the password.
passwd root
7. Update selinux information
touch /.autorelabel
8. Exit chroot
exit
9. Reboot your system
reboot
ที่มา https://www.unixmen.com/reset-root-password-centos-7/