This doc explains how to set a new password for the root user on a Linux VPS by booting the machine in single-user mode using VNC.
Start by Enabling VNC
Lauch noVNC session
Reboot your VPS
Enter the Grub (boot loader) menu
Press `e` on your keyboard to edit the kernel boot options.
Highlight the second stanzas (line) and press `e` again.
Edit the line highlighted in the previous step
1
at the end of the line as indicated in the following screenshot, then confirm pressing Enter
.On Debian, add init=/bin/bash
instead of 1
at the end of the line.Now you see the Grub stanzas as shown in step 5
b
to continue booting, using the modified configuration. Linux will now boot into single-user mode, allowing for some special administrative tasks. (This will provide you with root access without the need to enter the root password) and can be used to set a new root password. Once the system is up and running type the following command to update the root password:Once finished, reboot your VPS and you will be able to use the newly set root password