How to reset Windows Server 2012 R2/2016/2019/2022 administrator password

Problem

You have forgotten or lost the Administrator password on Windows Server 2012 R2, 2016, 2019, or 2022 dedicated or VPS server.

Solution

⚠️ NodeSpace does not store changed passwords. If you require a password reset on a server, you must verify account ownership and authorization. You cannot request a password reset through live chat.

Boot into sysrescuecd

If you're on our SolusVM environment, we have the latest version of NBoot available which allows unauthenticated booting into sysrescuecd. Dedicated server customers can connect to VPN or request that we load sysrescuecd for use over IPMI. 

Warning: our sysrescuecd automatically logs into root and is only accessible via VNC or IPMI console. 

Mount the Windows partition

Locate the Windows partition by running fdisk -l. Depending on your server, you may see one or more NTFS partitions. 

Create a mount point for the Windows partition:

mkdir /mnt/windows

And then attempt to mount the partition:

mount /dev/sda1 /mnt/windows

If you receive a notice about an unclean filesystem, follow the next instructions. If the filesystem mounts and you do not receive any messages, proceed to the next section.

umount /dev/sda1

And now run ntfsfix to clean the filesystem:

ntfsfix /dev/sda1

And attempt to remount:

mount /dev/sda1 /mnt/windows

Unlock/clear password

Now navigate to C:\Windows\System32\Config\ on the mounted filesystem:

cd /mnt/windows/Windows/System32/config/

And then run the following command to load chntpw

chntpw -i SAM

Select option 1

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)
# cd /mnt/win/Windows/System32/config/
# cd /mnt/win/Windows/System32/config/

And then select the RID of the account:

| RID -|---------- Username ------------| Admin? |--Lock?--| 
| 01f4 | Administrator | ADMIN |dis/lock |
| 01f5 | Guest | |dis/lock |
| 03e9 | datacadmin | ADMIN |dis/lock |

Please enter user number (RID) or 0 to exit: [03e9]

Typically this will be 3e9 but it could be 1f4 for the main administrator account. 

Choose an option from the menu. You will probably one to pick option 1 in most cases.

- - - - 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

Once you have cleared the password, press Q and enter twice to exit user edit mode and exit chntpw. When prompted, select Y to write the changes to the SAM hive.

You can now reboot your server into Windows. Remember to change the boot order or remove the boot ISO.

Set Windows password via console

Important: Windows will not permit a user to login over RDP with a blank password. You must login to Windows using IPMI or VNC to set a new user password.

Article Information
  • Article ID: 283
  • Category: Windows Server
  • Viewed 522 times.
  • Rating:
    (0)
  • Was this article helpful?
  • Yes No
Did you find this article helpful?