How to Reset Windows Password in Linux Rescue
If you lost your windows user password, you can boot into Linux Live CD or Rescue CD and reset your Windows password as follows. Most VPS and dedicated server providers have the option to boot your server into rescue mode.
Install required packages
1 |
apt-get install chntpw ntfs-3g |
Find the windows partition and mount it
1 |
mount -t ntfs /dev/nvme0n1p1 /mnt |
If you get error while mounting, see NTFS The disk contains an unclean file system.
Go to the directory where Windows Password is stored
1 |
cd /mnt/Windows/System32/config |
To list available users, run
1 |
chntpw -l SAM |
To reset the password for a user, run
1 |
chntpw -u USER_NAME_HERE SAM |
Select option 1
1 |
1 - Clear (blank) user password |
This will set the windows password for the user to blank. You need to log in to the server using the console, it won’t ask for any password. Once logged in, you can set a password for the user. You can’t log in using RDP with a blank password.
For alternative password reset, use
1 |
chntpw -i SAM |
You will get text based menu to select users, then reset password.
Back to Windows