---
title: How to Reset the Root Password of a Vultr Compute Instance
url: https://docs.vultr.com/how-to-reset-the-root-password-of-a-vultr-compute-instance
description: Learn how to reset the root password of your Vultr Compute Instance with our step-by-step guide. Regain access to your server quickly and securely.
publish_date: 2025-11-06T14:43:45.897000Z
last_updated: 2026-05-14T17:47:58.653000Z
author: Aashish Chaurasiya
header_image: https://docs.vultr.com/public/doc-assets/2362/1ee534fd-2de3-4d34-98c3-2def961fb94c.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

Resetting your root password is essential when you lose administrative access to your server due to forgotten credentials or misconfiguration. Using the SystemRescue ISO available in the Vultr Console, you can regain access without reinstalling the operating system or losing data.

This guide outlines how to reset the root or administrator password on a Vultr Cloud Compute instance across multiple operating systems, including Linux distributions, FreeBSD, OpenBSD, and Windows Server, without reinstalling the system or affecting existing data.

> [!NOTE]
> Before performing any of the steps below, take a snapshot of your instance to avoid potential data loss or application disruption.

???+ note "Reset the Root Password on Ubuntu and Debian"

    The SystemRescue ISO provides a minimal rescue environment that operates independently of the installed OS. Mounting the root partition and using `chroot` allows the root password to be reset without reinstalling the system.

    1. Log in to the [Vultr Console](https://console.vultr.com/).
    1. Navigate to **Instances** under **Compute**.
    1. Select the instance for which you want to reset the root password.
    1. Click **Settings**, then select **Custom ISO**.
    1. Under the **ISO Library**, choose the **SystemRescue ISO** image and click **Attach ISO and Reboot**
    1. Open the web console by clicking the **View Console** icon on the instance information page.
    1. In the console, press **Enter** to boot using the default **SystemRescue kernel**.
    1. After the instance boots, you see a prompt like below.

        ```
        [root@sysrescue ~]#
        ```

        This confirms that the system is running in SystemRescue mode.

    1. List the attached block devices.

        ```console
        # lsblk
        ```

        Output:

        ```
        NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
        loop0    7:0    0 647.7M  1 loop /run/archiso/sfs/airootfs
        sr0     11:0    1   720M  0 rom  /run/archiso/bootmnt
        vda    253:0    0   180G  0 disk 
        ├─vda1 253:1    0   260M  0 part
        └─vda2 253:2    0 179.7G  0 part
        ```

    1. Mount the root block device.

        ```console
        # mount /dev/vda2 /mnt
        ```

        This command mounts the root partition at `/mnt`. Replace `/dev/vda2` with your actual root partition.

    1. Chroot into the mounted system.

        ```console
        # chroot /mnt
        ```

        This command switches the shell's root directory to the mounted system under `/mnt`, allowing you to operate as if you're inside the original system. It enables you to run commands like `passwd` to modify the root user's password in the correct environment.

    1. Reset the root password.

        ```console
        # passwd
        ```

        When prompted, enter a new strong password twice to confirm. This updates the root user's credentials on the mounted system, restoring administrative access after reboot.

    1. Exit the `chroot` environment.

        ```console
        # exit
        ```

    1. Reboot the instance.

        ```console
        # reboot
        ```

    1. After the `reboot`, return to the **Custom ISO** section under **Settings**.
    1. Click **Remove ISO** to detach the rescue ISO and boot the server using root block device.

??? note "Reset the Root Password on CentOS, AlmaLinux, and Rocky Linux"

    RHEL-based distributions require an additional SELinux relabeling step after a password change to restore correct file security contexts on the next boot. The steps below use the SystemRescue ISO to mount the root partition and reset the password.

    1. Log in to the [Vultr Console](https://console.vultr.com/).
    1. Navigate to **Instances** under **Compute**.
    1. Select the instance for which you want to reset the root password.
    1. Click **Settings**, then select **Custom ISO**.
    1. Under the **ISO Library**, choose the **SystemRescue ISO** image and click **Attach ISO and Reboot**
    1. Open the web console by clicking the **View Console** icon on the instance information page.
    1. In the console, press **Enter** to boot using the default **SystemRescue kernel**.
    1. After the instance boots, you see a prompt like below.

        ```
        [root@sysrescue ~]#
        ```

        This confirms that the system is running in SystemRescue mode.

    1. List the attached block devices.

        ```console
        # lsblk
        ```

        Output:

        ```
        NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
        loop0    7:0    0 647.7M  1 loop /run/archiso/sfs/airootfs
        sr0     11:0    1   720M  0 rom  /run/archiso/bootmnt
        vda    253:0    0   180G  0 disk 
        ├─vda1 253:1    0   260M  0 part
        └─vda2 253:2    0 179.7G  0 part
        ```

    1. Mount the root block device.

        ```console
        # mount /dev/vda2 /mnt
        ```

        This command mounts the root partition at `/mnt`. Replace `/dev/vda2` with your actual root partition.

    1. Chroot into the mounted system.

        ```console
        # chroot /mnt
        ```

        This command switches the shell's root directory to the mounted system under `/mnt`, allowing you to operate as if you're inside the original system. It enables you to run commands like `passwd` to modify the root user's password in the correct environment.

    1. Reset the root password.

        ```console
        # passwd
        ```

        Enter a new strong password twice when prompted. This updates the root user's credentials on the mounted system, restoring administrative access.

    1. Create a `.autorelabel` file to trigger SELinux relabeling.

        ```console
        # touch /.autorelabel
        ```

        This step is required for RHEL-based systems where SELinux is enabled. It ensures that file contexts are restored on the next boot to prevent login issues after the password change.

    1. Exit the `chroot` environment.

        ```console
        # exit
        ```

    1. Reboot the instance.

        ```console
        # reboot
        ```

    1. After the `reboot`, return to the **Custom ISO** section under **Settings**.
    1. Click **Remove ISO** to detach the rescue ISO and allow the system to boot from the root block device

??? note "Reset the Root Password on Fedora"

    Fedora uses SELinux and requires a relabeling pass after a password reset to restore file security contexts. The GRUB boot parameter `autorelabel=1` triggers this process on the next boot.

    1. Log in to the [Vultr Console](https://console.vultr.com/).
    1. Navigate to **Instances** under **Compute**.
    1. Select the instance for which you want to reset the root password.
    1. Click **Settings**, then select **Custom ISO**.
    1. Under the **ISO Library**, choose the **SystemRescue ISO** image and click **Attach ISO and Reboot**
    1. Open the web console by clicking the **View Console** icon on the instance information page.
    1. In the console, press **Enter** to boot using the default **SystemRescue kernel**.
    1. After the instance boots, you see a prompt like below.

        ```
        [root@sysrescue ~]#
        ```

        This confirms that the system is running in SystemRescue mode.

    1. List the attached block devices.

        ```console
        # lsblk
        ```

        Output:

        ```
        NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
        loop0    7:0    0 647.7M  1 loop /run/archiso/sfs/airootfs
        sr0     11:0    1   720M  0 rom  /run/archiso/bootmnt
        vda    253:0    0   180G  0 disk 
        ├─vda1 253:1    0   260M  0 part
        └─vda2 253:2    0 179.7G  0 part
        ```

    1. Mount the root block device.

        ```console
        # mount /dev/vda2 /mnt
        ```

        This command mounts the root partition at `/mnt`. Replace `/dev/vda2` with your actual root partition.

    1. Chroot into the mounted system.

        ```console
        # chroot /mnt
        ```

        This command switches the shell's root directory to the mounted system under `/mnt`, allowing you to operate as if you're inside the original system. It enables you to run commands like `passwd` to modify the root user's password in the correct environment.

    1. Reset the root password.

        ```console
        # passwd
        ```

        Enter a new strong password twice when prompted. This updates the root user's credentials on the mounted system, restoring administrative access.

    1. Create a `.autorelabel` file to trigger SELinux relabeling.

        ```console
        # touch /.autorelabel
        ```

    1. Exit the `chroot` environment.

        ```console
        # exit
        ```

    1. Reboot the instance.

        ```console
        # reboot
        ```

    1. After the `reboot`, return to the **Custom ISO** section under **Settings**.
    1. Click **Remove ISO** to detach the rescue ISO and allow the system to boot from the root block device.
    1. Return to the web console and wait for the GRUB boot menu to appear.
    1. Select the default kernel and press **E** to edit the boot parameters.
    1. Add the following content at the end of the command after `console=tty0`.

        ```ini
        autorelabel=1
        ```

        It ensures that file contexts are restored on the boot to prevent login issues after the password change.
    1. Press **Ctrl** + **D** to boot with the updated configuration.

??? note "Reset the Root Password on FreeBSD"

    FreeBSD provides a **Single User Mode** accessible from the boot menu that drops the system into a root shell, bypassing normal authentication entirely.

    1. Log in to the [Vultr Console](https://console.vultr.com/).
    1. Navigate to **Instances** under **Compute**.
    1. Select the instance for which you want to reset the root password.
    1. Click the **Server Reboot** icon to reboot the server, then click the **View Console** icon to open the web console.
    1. From the boot menu, press `2` to select the **Boot Single** User option.
    1. After the instance enters single user mode, remount the root filesystem with read/write permissions.

        ```console
        # fsck && mount -u -a -o rw
        ```

    1. Confirm that the root filesystem is mounted at `/`.

        ```console
        # mount
        ```

        Output:

        ```
        /dev/ufs/rootfs on / (ufs, local, soft-updates, journaled, soft-updates)
        devfs on /dev (devfs)
        ```

    1. Change the root password.

        ```console
        # passwd
        ```

        When prompted, enter the new password twice. This updates the root user's credentials.

    1. Reboot the server.

        ```console
        # reboot
        ```

??? note "Reset the Root Password on OpenBSD"

    OpenBSD enters single-user mode via the `boot -s` flag at the boot loader prompt, providing a root shell with the filesystem mounted read-only until explicitly remounted.

    1. Log in to the [Vultr Console](https://console.vultr.com/).
    1. Navigate to **Instances** under **Compute**.
    1. Select the instance for which you want to reset the root password.
    1. Click the **Server Reboot** icon to reboot the instance, then click the **View Console** icon to open the web console.
    1. At the OpenBSD boot prompt, enter the following command to start the server in single user mode.

        ```console
        boot> boot -s
        ```

        When prompted:

        ```
        Enter pathname of shell or RETURN for sh:
        ```

        Press **Enter** to continue with the default `sh` shell.

    1. Remount the root filesystem with write permissions.

        ```console
        # fsck -p / && mount -uw /
        ```

    1. Change the root password.

        ```console
        # passwd
        ```

        Enter the new password twice when prompted to update the credentials.

    1. Press **Ctrl** + **D** to continue booting into multi-user mode.

??? note "Reset the Windows Server Administrator Password"

    The `chntpw` utility, available in the SystemRescue environment, edits the Windows SAM registry directly to clear or reset account passwords without booting into Windows.

    ### Mount SystemRescue and Access the Console

    1. Log in to the [Vultr Console](https://console.vultr.com/).
    1. Navigate to **Instances** under **Compute**.
    1. Select your Windows instance.
    1. Click the **Server Stop** icon to perform a clean shutdown.
    1. After the server is powered off, Click **Settings**, then select **Custom ISO**.
    1. Under the **ISO Library**, select **SystemRescue ISO** and click **Attach ISO and Reboot**.
    1. Open the **View Console** from the instance information page.
    1. At the boot menu, select **Boot SystemRescue using default options** and press **Enter**.
    1. Wait for the rescue environment to load and display the root prompt.

        ```
        [root@sysrescue ~]#
        ```

    ### Identify and Mount the Windows Partition

    1. List all the attached devices.

        ```console
        # fdisk -l
        ```

        Output:

        ```
        ...
        Device         Start       End   Sectors  Size Type
        /dev/vda1       2048   4098047   4096000    2G Windows recovery environment
        /dev/vda2    4098048   4630527    532480  260M EFI System
        /dev/vda3    4630528   4896767    266240  128M Microsoft reserved
        /dev/vda4    4896768 157286366 152393599 72.7G Microsoft basic data
        ...
        ```

        Identify the main Windows partition (usually the largest, like `/dev/vda4`).

    1. Run `ntfsfix` to clean any dirty shutdown flags.

        ```console
        # ntfsfix /dev/vda4
        ```

        Replace `/dev/vda4` with your actual Windows partition.

    1. Mount the Windows partition.

        ```console
        # mount /dev/vda4 /mnt
        ```

    1. Navigate to the **Windows SAM registry** directory.

        ```console
        # cd /mnt/Windows/System32/config/
        ```

    ### Reset the Administrator Password with `chntpw`

    1. Launch `chntpw` in interactive mode.

        ```console
        # chntpw -i SAM
        ```

        Output:

        ```
        chntpw version 1.00 140201, (c) Petter N Hagen
        ...
        <>=======<> chntpw Main Interactive Menu <>=======<>

        Loaded hives: <SAM>

          1 - Edit user data and passwords
          2 - List groups
          - - -
          9 - Registry editor, now with full write support!
          q - Quit (you will be asked if there is something to save)

        What to do? [1] ->
        ```

    1. At the main menu, enter `1` and press **Enter** to edit user data and passwords.

    1. When the list of users appears, find the **Administrator** account.

        ```
        ==== chntpw Edit User Info & Passwords ====

        | RID  | ------- Username ---- | Admin? |- Lock? --|
        | 01f4 | Administrator         | ADMIN  |          |
        | 01f7 | DefaultAccount        |        | dis/lock |
        | 01f5 | Guest                 |        | dis/lock |
        | 01f8 | WDAGUtilityAccount    |        | dis/lock |

        Please enter user number (RID) or 0 to exit: [1f4] _
        ```

    1. Enter the **RID** of the **Administrator** (In this case, 01f4) and press **Enter**.
    1. At the User Edit Menu, enter **1** to clear the password:

        ```
        ============= USER EDIT =============

        RID      : 0500 [01f4]
        Username : Administrator
        ...
        00000220 = Administrators (which has 1 members)
        ...
        Total  login count: 4

        - - - User Edit Menu:
         1 - Clear (blank) user password
         2 - Unlock and enable user account [seems unlocked already]
         3 - Promote user (make user an administrator)
         4 - Add user to a group
         5 - Remove user from a group
         q - Quit editing user, back to user select

        Select: [q] > 1
        ```

        Output:

        ```
        Password cleared!
        ```

    1. Press `q` twice to exit back to the main prompt.
    1. When prompted to save changes, enter **Y**.

        ```
         Hives that have changed:
         #  Name
         0  <SAM>
         Write hive files? (y/n) [n] : y
        ```

        This confirms and writes the updated SAM database to disk, saving the cleared **Administrator** password.

    ### Unmount and Reboot the Instance

    1. Return to the root directory.

        ```console
        # cd /
        ```

    1. Unmount the Windows partition.

        ```console
        # umount /dev/vda4
        ```

    1. Go back to the **Custom ISO** section under **Settings** in the [Vultr Console](https://console.vultr.com/).
    1. Click **Remove ISO** to detach the rescue image and reboot the instance.

    > [!NOTE]
    > After completing these steps, the **Administrator** password is cleared. You will be automatically logged in via console without entering a password.

    ### Set a New Administrator Password

    1. Once the system boots and logs in, open the **Start** menu and go to **Settings**.
    1. Navigate to the **Sign-in options** under **Accounts**.
    1. Click **Password**, then **Add**.
    1. Set a new password and confirm it.
    1. Click **Finish** to apply the changes.

    This ensures that your Administrator account is secured and accessible both via console and remote connections like RDP.

## Conclusion

You have successfully reset the root or administrator password on your server using **SystemRescue ISO** or **Single User Mode**. Whether on Linux, BSD, or Windows, you restored administrative access without reinstalling the operating system or losing data. By following each platform-specific procedure, you ensured secure access to your Vultr instance and maintained system integrity.
