CentOS7 is root password changing is totally different from CentOS 6. Now I going to show you how to reset root password in CentOS 7. This way also working for Citrix Xenserver Virtual Machine, KVM and other’s Virtual Machine platform. Even you can reset CentOS 7 password, if your server going to Emergency Maintenance mode.
Step 1: In the boot grub menu select option to edit
Step 2: Go to the line of Linux 16 and find out ro
Step 3: Now change ro with rw init=/sysroot/bin/sh
Step 4: Now press Control+x to start on single user mode
Step 5: Now access the system with this command
Step 6: Reset the password.
Step 7: Update selinux information
Step 8: Exit chroot
Step 9: Reboot your system
That’s it 🙂 Enjoy! 🙂