> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to reset the root password for your Self-Managed server

> This article explains how to reset the root password when access is lost. This method requires booting into emergency mode using the GRUB bootloader and performing the reset from a restricted shell environment.

# Step 1: Access the Server Console (VNC)

1. Log in to [https://my.hosting.com/](https://my.hosting.com/)

<br />

2. Go to Products and Services -> Hosting and Services

![](https://files.readme.io/3e28239fe62fec8e90391895567ef5b9630441c4d4b7547e325a3ee3e1630356-image.png)

<br />

<br />

3. Click on **Manage**

![](https://files.readme.io/9692668e5ce3fff5870bd7d5405fd1dc70a4572f3815e7c4247dceb56e4cedd5-image.png)

4. Click the **Login** button

![](https://files.readme.io/55d00ffebbff44f60f50f411b810a9f8195e14b41b03dc23f87919d3f9957228-image.png)

Now you are in your Console

![](https://files.readme.io/da4c07e5d51d0d2e6c08c151dfbf8f798d4cefbe0c5c0afc015fa44cb094cbbe-image.png)

# Step 2: Boot into GRUB Menu

1. Reboot the system.

![](https://files.readme.io/583f5a44cb919c0b095d3117db7a82fb858a6a59ce237646582bc084a53cbdd2-image.png)

<br />

2. When the GRUB menu appears, select the default kernel entry. You should navigate with the arrows

![](https://files.readme.io/7d057ecfa56a892ca0abc213606e59115ac26efaf80c0edcd66d37e46decdeda-image.png)

<br />

3. Press `e` to edit the boot parameters.

# Step 3: Modify Kernel Boot Parameters

1. Locate the line starting with linux or linuxefi.
2. At the end of that line, add:

```text theme={null}
rd.break
```

![](https://files.readme.io/cce741a7ad9f166364e00f60e629302ca7c14e33f3eb2105a99e8086755ee1b5-image.png)

3. Press Ctrl + X (or F10) to boot with the modified parameters.

# Step 4: Enter Emergency Mode Shell

After booting, the system will drop into an emergency shell with a prompt similar to:

```text theme={null}
switch_root:/#
```

# Step 5: Remount the System as Writable

```text theme={null}
mount -o remount,rw /sysroot
```

# Step 6: Chroot into the Installed System

Switch into the actual system environment:

```text theme={null}
chroot /sysroot
```

# Step 7: Reset the Root Password

Run the password utility:

```text theme={null}
passwd root
```

* Enter a new password when prompted.
* Confirm the new password.

# Step 8: Enable SELinux Relabeling

<Warning>
  This step should be performed only if you are using AlmaLinux
</Warning>

To ensure proper SELinux context restoration, create the autorelabel file:

```text theme={null}
touch /.autorelabel
```

# Step 9: Exit and Reboot

Exit the chroot environment and reboot the system:

```text theme={null}
exit
exit
```

<br />
