To reset the root password of your server, you will need to boot into single user mode.
You need to open console first.
To Open the console:
Login to customer area and go to the server details page from Services menu > My Services > Click on service name > Click on Console
CentOS 6
- Open Console
- Click send
CTRL+ALT+DEL
to reboot the server. Or press Restart button from the control panel while you have the console open. - You will see a GRUB boot prompt telling you to press any key - you have only a few seconds to press a key to stop the automated booting process. (If you miss this prompt you will need to restart the machine again)
- At the GRUB prompt, type A to append to the boot command.
- Add the text
single
and press ENTER - The system will boot and you will see the root prompt. Type passwd to change the root password and then reboot again.
CentOS 7
- Open Console
- Click send
CTRL+ALT+DEL
to reboot the server. Or press Restart button from the control panel while you have the console open. - As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
- You will see a GRUB boot prompt - press E to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)
- Find the kernel line (it starts with "linux16"), change
ro
torw init=/sysroot/bin/sh
. - Press CTRL+X or F10 to boot single user mode.
- Access the system with the command:
chroot /sysroot
. - Run
passwd
to change the root password. - Reboot the system:
reboot -f