---
title: Resetting the Administrator password on Windows Server OS
description: Learn how to securely reset the Administrator password on Windows Server Elastic Metal servers using rescue mode.
tags: windows rescue password reset administrator
dates:
  validation: 2025-07-15
  posted: 2023-12-14
---
import Requirements from '@macros/iam/requirements.mdx'


During the installation or reinstallation of an Elastic Metal server with a Windows Server operating system, an administrator password is set by you (Administrator account).

If you have lost this password, you can reset it via rescue mode. This guide explains the steps to securely reset the Administrator password and regain access to your server.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An Elastic Metal server [installed](/elastic-metal/quickstart/#how-to-create-an-elastic-metal-server)

## Removing the old Administrator password

<Message type="tip">
  We recommend [backing up your data](/tutorials/restic-s3-backup/) before proceeding.
</Message>

1. Reboot your Elastic Metal server into [rescue mode](/elastic-metal/how-to/use-rescue-mode/).
2. Log into rescue mode.
3. Install the packages `ntfs-3g` and `chntpw` using the APT package manager.
    ```bash
    sudo apt install ntfs-3g chntpw
    ```
4. Mount the Windows system partition.
    ```bash
    sudo ntfsfix /dev/sda2
    ```
5. List the user accounts configured in Windows:
    ```bash
    sudo chntpw -l /mnt/Windows/System32/config/SAM
    ```
    An output similar to the following displays:
    ```
    chntpw version 1.00 140201, (c) Petter N Hagen
    Hive </mnt/Windows/System32/config/SAM> name (from header): <\SystemRoot\System32\Config\SAM>
    ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c <lh>
    File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage)
    Used for data: 343/38728 blocks/bytes, unused: 32/6104 blocks/bytes.

    | RID -|---------- Username ------------| Admin? |- Lock? --|
    | 01f4 | Administrator                  | ADMIN  | dis/lock |
    | 01f7 | DefaultAccount                 |        | dis/lock |
    | 01f5 | Invit�                         |        | dis/lock |
    | 01f8 | WDAGUtilityAccount             |        | dis/lock |
    ```
    <Message type="tip">
      The administrator account of your server can either be `Administrator` or `Administrateur` depending on the installation.
    </Message>
6. Edit the `Administrator` account by running the following command:
    ```bash
    sudo chntpw -u Administrator /mnt/Windows/System32/config/SAM
    ```
    A menu displays as follows:
    ```
    ================= USER EDIT ====================

    RID     : 0500 [01f4]
    Username: Administrator
    fullname:
    comment : User account with administrative privileges
    homedir :

    00000220 = Administrators (which has 1 members)

    Account bits: 0x0010 =
    [ ] Disabled        | [ ] Homedir req.    | [ ] Passwd not req. |
    [ ] Temp. duplicate | [X] Normal account  | [ ] NMS account     |
    [ ] Domain trust ac | [ ] Wks trust act.  | [ ] Srv trust act   |
    [ ] Pwd don't expir | [ ] Auto lockout    | [ ] (unknown 0x08)  |
    [ ] (unknown 0x10)  | [ ] (unknown 0x20)  | [ ] (unknown 0x40)  |

    Failed login count: 5, while max tries is: 0
    Total  login count: 2

    - - - - User Edit Menu:
    1 - Clear (blank) user password
    2 - Unlock and enable user account [probably locked now]
    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] >
    ```
7. Type `1` and press enter to clear the user password:
    ```
    Select: [q] > 1
    Password cleared!
    ```
8. Type `q` and press `Enter` to quit. A summary of the edited files displays:
    ```
    Hives that have changed:
    #  Name
    0  </mnt/Windows/System32/config/SAM>
    Write hive files? (y/n) [n] :
    ```
9. Type `y` and press `Enter` to confirm the writing of the files.
    ```
    Write hive files? (y/n) [n] : y
    0  </mnt/Windows/System32/config/SAM> - OK
    ```
10. Reboot the server back into [normal mode](/elastic-metal/how-to/use-rescue-mode/#rebooting-back-to-normal-mode).

## Setting a new Administrator password

1. [Activate remote access](/elastic-metal/how-to/activate-remote-access/) on your server to connect via the KVM over IP device.
2. Open the remote console to access the screen output.
3. Open the start menu and select the `Administrator` username to access user settings.
4. Click the password panel, then **Add** to create a new password.
5. Enter the new password, confirm it, and set a reminder.
6. Exit the remote console.
    You can now log into your server using the Remote Desktop Viewer and the new password.