> For the complete documentation index, see [llms.txt](https://spacecore.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spacecore.gitbook.io/wiki/en/os-and-software/linux-password-recovery.md).

# Linux Password Recovery

{% hint style="danger" %}

### This content is outdated

**The knowledge base has moved →** [**https://wiki.spacecore.pro/**](https://wiki.spacecore.pro/)

This wiki is no longer updated. All current guides and articles are at the new address.
{% endhint %}

{% content-ref url="<https://wiki.spacecore.pro/>" %}
<https://wiki.spacecore.pro/>
{% endcontent-ref %}

***

Log in to [VMmanager](https://spacecore.cloud/) and select your virtual server.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2F8DzGGhanrFJ7qc6sK1yg%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.31.57.png?alt=media&amp;token=ec9ca250-6ae5-4248-b069-1e020c9f78a9" alt=""><figcaption></figcaption></figure>

Go to the «Menu» section and select «Recovery mode».

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FU20B5VxERvpkXiV0V6wt%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.33.34.png?alt=media&amp;token=f4f5e712-8437-4aa4-bae5-7b67b3120009" alt=""><figcaption></figcaption></figure>

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2Fl64jAu946hRgrSkg7FA5%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.36.43.png?alt=media&amp;token=8599702c-6338-4f4b-992c-5cf36cebfe16" alt=""><figcaption></figcaption></figure>

Agree to connect the SystemRescueCD image and reboot.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FYBShJTyapQ5FvX6adnd5%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.37.57.png?alt=media&amp;token=7749f2ef-1119-466a-931e-f764e20bbad7" alt=""><figcaption></figcaption></figure>

After using the button, the process of loading the server in recovery mode began.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FhNdi5mtwo7TfCguhUrAT%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.41.39.png?alt=media&amp;token=d23eb81b-40c5-4134-ad8f-55a566b0bd6b" alt=""><figcaption></figcaption></figure>

Great, the server’s ready.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2F1F42YEesgaJq351kBYnN%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.44.35.png?alt=media&amp;token=64f46b15-a306-450d-840e-72886b5d37f8" alt=""><figcaption></figcaption></figure>

Connect to the server via VNC (SSH and sFTP are unavailable).

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2F6SYEcNBGjNFWpXbTB4H9%2Fimage.png?alt=media&amp;token=07632995-e1db-4e09-9bdd-79ddf3c90d09" alt=""><figcaption></figcaption></figure>

Use the command «‎`lsblk`»‎ to view all existing server drives.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FuK1jJ2thYboPMxbL5Zrl%2Fimage.png?alt=media&amp;token=f897cdd1-0c17-4643-945b-33bad491375b" alt=""><figcaption></figcaption></figure>

We need to mount the main disk partition vda2, we use the command

```
mount /dev/vda2 /mnt
```

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FtSczj0hL1oypw7N5C1Yu%2Fimage.png?alt=media&amp;token=979449e6-3527-4076-9d4b-2739615a2a28" alt=""><figcaption></figcaption></figure>

Done! Next, let’s specify a new root directory for further work.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FV5L5BamLSJPPexVOxvq1%2Fimage.png?alt=media&amp;token=690b6609-79a9-465f-9115-34353eaf7af7" alt=""><figcaption></figcaption></figure>

After execution, you can only use the last command to change the **root** password.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FPcaCz7pLJnMoszygNv9S%2Fimage.png?alt=media&amp;token=b8e3e3d0-7489-480e-ad3f-21fc866525e8" alt=""><figcaption></figcaption></figure>

We ask for a new password and repeat it. We see a message that the user’s password has been successfully changed.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FQ2MHSSohM1TYaubiSunx%2Fimage.png?alt=media&amp;token=f61e2e23-c48d-4248-bde2-0290346b1503" alt=""><figcaption></figcaption></figure>

Exit recovery mode and reconnect with the new password.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FLJu7wfIFvE4gXxKr1xZb%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.50.41.png?alt=media&amp;token=cdee5fe0-36c0-4421-ad31-4adec4a276d3" alt=""><figcaption></figcaption></figure>

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FSBQtUgGRPVSaO90a5fMC%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-05-04%20%D0%B2%2016.52.56.png?alt=media&amp;token=5af31d42-af64-4742-8bcf-d6816df502cc" alt="" width="202"><figcaption></figcaption></figure>
