If you (or someone you know) ever forget your Windows password, you'll be glad to know about chntpw
, a neat Linux utility that you can use to reset a Windows password. For this how-to, I created a Windows virtual machine and set the password to pass123
on my user account, Archit
-PC
. I also created a Live USB with Fedora 27[1] using the Fedora Media Writer[2] application.
chntpw
.
1. Attach the Live USB to your PC and restart from the login screen, as shown below:
2. Boot from the Live USB and click on Try Fedora:
3. Log out from live-user
and log into root
. This step is not necessary, but I prefer to use the root
user to bypass any permission issues:
4. Install the chntpw
utility[3] with the following command (you'll need a live internet connection for this):
sudo dnf install -y chntpw
5. Check which partition should be mounted by sfdisk -l
...:
and mount that partition (e.g., /dev/sda2
) with the following command:
sudo mount /dev/sda2 /mnt/Microsoft/
Change the current directory to the config
directory:
cd /mnt/Microsoft/Windows/System32/config/
Also, check the user records in the Security Account Manager (SAM) database:
6. Edit the SAM database with the command:
sudo chntpw -i SAM
Then type 1
(for Edit user data and passwords
):
And type your user account name