To reset the root password of your server, you will need to boot into single user mode.
Access the Manage section of your server in the customer portal and follow these steps. The option depends on the bootloader version on the machine:
Option 1 (CentOS 6 Linux, etc)
- Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
- 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 VM again)
- At the GRUB prompt, type “a” to append to the boot command
- Add the text “single” and press enter
- System will boot and you will see the root prompt. Type “passwd” to change the root password and then reboot again.
Option 2 (Debian, Ubuntu, CentOS 7, etc)
- Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
- 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 (starts with “linux /boot/”) and add init=”/bin/bash” at the end of the line
- Press CTRL-X or F10 to boot
- System will boot and you will see the root prompt. Type “mount -rw -o remount /” and then “passwd” to change the root password and then reboot again.
FreeBSD
The boot menu has an option to boot into single user mode. Press the key for single user mode (2). At the root prompt, type “passwd” to change the root password and then reboot again.