How to reset the Root password in CentOS 7.x?

Before you reset the CentOs root password, you will need to have the access to login to My Z.com account.

Step1. After login to My Z.com, please go to the “Cloud” menu and click on “the server name tag” to access the VM console.

Step2. Please click on the “Console” to access the VM console.

Step3. A new window will pop up and you will see the VM Console.

Step4. Click on the “Special Key” at the left above.

And then, click “Yes” to reboot the VM.

Step5. You will see the boot order below and press “e” on the default boot order.

Step6. When you see the boot config, scroll down the bottom and find  “quiet”. Please delete all the lines behind this. Please carefully delete the line.

After that replace the line with the following text. 

[Code]=> rw init=/sysroot/bin/sh

Please click “Ctrl+x” to start the init mode.

Step7. After waiting for a second, you will see the boot in init mode and eneter the following.

[Code]=> chroot /sysroot

Step8. Then please type, “passwd” to change the new password for root.

[cmd]- passwd

Then enter your new password. Please note your password carefully.

Your root password was changed successfully.

Step9. After that please type “exit” and then reboot your VM.

cmd- exit

cmd- reboot

Then you can login the VM with new password.

Thank you!!!

88Cloud VPS
Back To Top