How to reset root password on CentOS Linux

Make sure you have access to the server’s IPMI: How to access IPMI through VPN
If you don’t have IPMI access to your server, please create a support ticket with an IPMI request and our engineers will be happy to create one for you.

1. Inside java or HTML5 console, please reboot your server and wait for the GRUB menu
2. Inside the GRUB menu select your first entry and press “E” key to edit.



3. Find a line with ro and change it to rw



4. After rw add init=/sysroot/bin/sh


5. Press CTRL+X to boot your server in rescue mode
6. Inside shell, type chroot /sysroot and press enter
7. Now you can type passwd command and change your root password
8. Type exit to close the chroot and type reboot. Your server will be boot with new root password.