Method for manually resetting the password for a Linux server.
To begin, we need to put the server into recovery mode. Go to the VMmanager control panel and log in with your account. From the list of virtual servers, select your specific one and navigate to its page.
Here, you can see the basic information about our virtual service, but in this case, we are interested in the "Menu" section.
Click on it and select "Recovery mode."
A warning message will appear stating that the SystemResqueCD image will be connected to the server, and a reboot will occur. Confirm this action.
After clicking the button, the server will start booting in recovery mode.
Excellent, the server is prepared.
Try to connect to the server via VNC (please note that SSH and sFTP are not available in this mode).
Use the "lsblk" command to view all existing storage devices on the server.
We need to mount the main disk partition, vda2, for this, use the following command:
mount /dev/vda2 /mnt
Done! Next, let's specify the new root directory for further work.
After completing this step, use the final command to change the root user's password.
You will be prompted to enter a new password and confirm it. You will see a message indicating that the root user's password has been successfully changed.
Now, let's disable the recovery mode and try to connect to the server.
Connect to the server with the new password!