One of the advantages of a VPS or hybrid server is that they are virtualised, providing additional access to manage the server even if you are locked out of the root account.
You can use the out-of-band SSH console to get back into your server if you have forgotten the root password.
You will need an SSH client to access the out-of-band console.
If your computer is running OS X or Linux, you have the Terminal application already installed on your computer.
If your computer is running Windows, you will need to download a third-party SSH client, such as PuTTY.
You will first need to turn your server off.
To do this:
When you have turned off your server, you can now log in via the SSH console.
To get the login details:
Once you have logged into the console, you should see the following screen:
To boot the server:
This screen shows the operating system choices. The top one is the default – the one that would normally start – but you want to start the server in single-user mode.
Single-user mode does not prompt you for a root login and allows you to change the password without prompting you for it.
To edit the boot parameters, allowing you to start the server in single-user mode:
Once the server has booted up, you will see this:
Dependent on the Linux distribution, your file system may be read-only when loaded in single-user mode.
To switch the file system to writable:
mount -o remount,rw /
To reset the root password:
Once the password has been changed, you can reboot the server.
To reboot the server:
Article ID: 471
Created On: Mon, Mar 16, 2015 at 5:14 PM
Last Updated On: Thu, Apr 23, 2015 at 12:03 PM
Online URL: https://www.heartinternet.uk/support/article/how-do-i-reset-my-root-user-password-on-my-virtual-linux-server.html