Reset a Windows user password from an Ubuntu live CD
Things to be aware before starting
- Make sure that secure boot is disabled and the Windows partitions aren’t encrypted.
- Make sure that Windows is properly shutdown. You can do this by either
pressing Shift before clicking Shutdown or by executing this command
shutdown /s /f /t 0in the terminal.
Boot into an Ubuntu Live CD
If it doesn’t boot or you can’t see the disk with Windows check the following:
- Is the SATA option set to AHCI instead of RAID?
Enable all the repositories
sudo apt-add-repository universe restricted multiverse sudo apt update
sudo apt install chntpw
Mount the Windows drive and navigate to the SAM file
It doesn’t mather where you mount the drive you just need to know where you mounted it. Afterwards navigate to the SAM file e.g.:
List all the accounts in the SAM file
chntpw -l SAM
Choose the user and reset the password
The following command will select the user
localadmin, unlock it, reset the
password to a blank string and then quit the application.
chntpw -u localadmin SAM 2 1 q
Reboot and login
Before you boot back into Windows make sure that you reset the SATA option back to what it previously was. Otherwise Windows might refuse to boot. Now you should be able to boot back to Windows and login.