If you have lost the root password of your server, and you cannot access the server as root, then this article will help you resolve this issue.
To do this, you must access the server console. The server console can be accessed via the customer panel portal.servers.com.
The password reset algorithm is quite simple:
Restart the server
Before starting the OS, boot parameters will change in the GRUB boot menu
OS will be loaded in the single-user mode
Set the new root password without the old password requested
Let us examine in detail how reset the password for Ubuntu 16.04.
If the server is turned on and loaded, restart it by pressing CTRL + ALT + DEL. If not, turn on the server. After the BIOS menu, before the OS starts, a timer appears. To stop it and access the GRUB boot menu, press any key, preferably ESC.
To start the system in a single-user mode, it is necessary to edit the boot line. To do this, use the keys ↓ and ↑to navigate through the menu, select your boot line (often it is "* Ubuntu"), and press the "e" key to access the boot mode editing options.
Find the line that starts with "linux /boot ". At the end of the line, change the "ro" parameter to "rw", add the parameter "init=/bin/bash" after a space. Now everything is ready to start the system in the single-user mode. Press "CTRL+X" or "F10" to start the system.
As a result, you get a console where you should run the command:
Enter the new root password twice.
The root password is now changed. Save the changes and restart.