Reset a Windows User Password with a Linux Live USB Stick · Sebastian Endres

Reset a Windows User Password with a Linux Live USB Stick

January 18, 2023 • 1 min to read • 🇺🇸 • Tech
Content

As part of my "IT internship" at EduVentures during my voluntary gap year in Namibia, I have to reset the user passwords of many Windows computers. I'm not an expert in Windows administration (and now that I have to work with Windows, I know why I'm not). However, I found a way to do it using only an ArchLinux live USB stick (which is my faithful companion and lifesaver as it seems that not many people in Namibia use Linux and I have no one to ask for support in case of a laptop breakdown). Anyway, here are the required steps to reset the Windows user password:

Get a Wi-Fi Connection

Boot from the live USB stick. The required tools are not part of the ArchLinux installation ISO. That's why we need to install them. Usually there is no wired Ethernet available and we have to use Wi-Fi:

First we have to find out the name of the Wi-Fi adapter:

$ ip link

Usually the Wi-Fi link has a name like wlan0 or wlp2s0. I assume that your Wi-Fi network is secured with WPA2-PSK.

$ wpa_passphrase ${SSID} ${PASSPHRASE} > /etc/wpa_supplicant/wpa_supplicant-${WIFI_LINK}.conf
$ systemctl restart wpa_supplicant@${WIFI_LINK}.service
$ ip a show ${WIFI_LINK}

Now, you should be connected to the Internet.

Download Required Packages

$ pacman -Sy chntpw ntfs-3g

Mount Windows Partition

Find the main Windows partition (it is most likely the first NTFS partition on the disk). Most likely, Windows didn't shut down completely, but went into hibernation, leaving the NTFS in a dirty state. Thus, we have to mount it in a special way:

$ ntfs-3g -o remove_hiberfile /dev/sdXN /mnt

Mounting it with mount(8) does not mount it read-writeable and re-mounting it read-writeable does not work either.

Reset the Password

$ cd /mnt/Windows/System32/config/
$ chntpw -i SAM

Now, navigate through the menu and change the password of the desired user to a blank password. Don't forget to unlock the user and reset the failed password counter.

chntpw at work
chntpw at work

Finally unmount and reboot to Windows and enjoy your passwordless user.