Have you forgotten the password for your dedicated Linux server? There's nothing wrong with that, let's solve this problem.
First of all, we need to put our dedicated server into recovery mode (Rescue). This can be done by contacting technical support or using the control panel, if there is such a technical possibility.
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252Fgn2H1luz9tmKx7sfleFp%252Fimage.png%3Falt%3Dmedia%26token%3Db7f993a5-02be-4f50-b3f2-ba2a676679ff&width=768&dpr=4&quality=100&sign=29cd8884&sv=1)
We use the lsblk
command to view the existing drives on our server.
If you are using Software RAID on your server, the output will be something like this. Pay attention to the md sections, namely md0, md1, md2:
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252FI3cNiB967Y6BnlDuIBGJ%252Fimage.png%3Falt%3Dmedia%26token%3D14db0c22-691e-49eb-aa0e-2422a26fd3f2&width=768&dpr=4&quality=100&sign=a22151db&sv=1)
If Software RAID is not used on your server, then depending on the types of drives, the output of the command will look something like this:
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252FCxdloxqKZmV1FYS6ONnw%252Fimage.png%3Falt%3Dmedia%26token%3Db126df16-f78e-4ba3-ae15-193b3642435f&width=768&dpr=4&quality=100&sign=ed27bc13&sv=1)
Next, you need to mount the partition of the main disk. Since Software RAID is used on our test server, md2 is suitable in this case.
Great!
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252FIsaFWzsfHxi3n3oGla63%252Fimage.png%3Falt%3Dmedia%26token%3Dcbe7fcf2-9a80-463b-b96c-dfa8c24b1452&width=768&dpr=4&quality=100&sign=8d35335e&sv=1)
Now we specify a new root directory to work on the newly mounted drive:
The main process is completed. Now all we have to do is use the standard command to change the password of the corresponding user.
We enter the new password twice.
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252FOpxXpWF2lcEVgfzBrg0g%252Fimage.png%3Falt%3Dmedia%26token%3D3e091485-db3f-4789-85e8-702c8a8d3d10&width=768&dpr=4&quality=100&sign=a73d96d5&sv=1)
Done.
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252FhI55vJAfseKHM3CG4mwJ%252Fimage.png%3Falt%3Dmedia%26token%3D442233f6-f94b-4082-b8f2-ad3156852566&width=768&dpr=4&quality=100&sign=ac3ce041&sv=1)
It simply remains to restart the server in the cloud panel or with the reboot
command to exit Rescue mode. After that, we can connect to our server using the new specified password.
If you get a similar error when using the reboot
command, then you need to use the CTRL + D
keyboard shortcut to exit the additional created session.
![](https://wiki.spacecore.pro/~gitbook/image?url=https%3A%2F%2F287241268-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyXvdNIxNLIOcexv7AfU2%252Fuploads%252FdXrQZfDeLoKIrPW4HNVn%252Fimage.png%3Falt%3Dmedia%26token%3D66ee6742-2bce-47a7-8b73-f50340b89943&width=768&dpr=4&quality=100&sign=113b48a0&sv=1)
Great. Now we can restart our server and start further work!
Last updated