# Reset Window Passwords With Linux
chntpw is a software utility for resetting or blanking local passwords used by Windows NT, 2000, XP, Vista, 7, 8, 8.1 and 10. It does this by editing the SAM database where Windows stores password hashes.
If you forget the windows password of your computer, or a computer friend. You can easily reset the password with chntpw a Linux terminal based utility.
We need a usb live linux, can be Arch Linux, Debian, Void Linux, Fedora. Make sure that the utility is in the official repos of the distro you choose.
## Install chntpw
For Arch Linux
sudo pacman -S chntpw
sudo apt install chntpw
For Void Linux
sudo xbps-install -S chntpw
## Drive Mount
First mount the windows partition (were windows is installed). Find the correct one with
sudo fdisk -l
Take note of the device path, ti should be somethgin like /dev/sda1
New create a directory to mount the partition, let’s say in /mnt
sudo mkdir /mnt/microsoft
Now mount the partition
sudo mount /dev/sda1 /mnt/microsoft
Then go to /mnt/microsoft and search for the config directory
If the path above is not correct, check for the correct path for the config directory.
First check the user records
sudo chntpw -l SAM
It should display some information and a table with usernames beside another info
Let’s reset the password
sudo chntpw -i SAM
Chose 1 - Edit user data and passwords, then type the user account name in the next menu press 1 - Clear (blank) user password, at last press q to get out of that menu then q for
You’ll see something like
chntpw version 1.00 140201, (c) Petter N Hagen Hive name (from header): <\SystemRoot\System32\Config\SAM> ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c File size 65536  bytes, containing 7 pages (+ 1 headerpage) Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. <>========<> chntpw Main Interactive Menu <>========<> Loaded hives: 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)
Press 1 to select (Edit user data and passwords) then type o select the user account name, you will see something like then press 1 - Clear (blank) user password
- - - 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] >
When the process is done type q to quit and then press y to save the changes.
Now reboot the computer you should be able to log into windows without a password.
----------© DarknessCode - LinuxSucks