Andrew's Articles

How to reset the password of a user/administrator account in any Windows version after XP*

Have you ever gotten yourself locked out of your account? Or perhaps you went to work one day to find that you couldn't log into the computers there because someone changed the password. In that case, this article is for you.

Step One: Prerequisites

A minimum 1GB USB thumbdrive is required. In order to use your thumbdrive, you will have to flash it with a Linux distribution called Grml. Do not worry, this will only be installed to the thumbdrive. In case you have any important files on the drive, be sure to back them up before proceeding.

Windows installations that are encrypted with BitLocker cannot have their passwords reset using this method. This is because the method requires modifying the SAM file, within C:\Windows\System32\config.

Step Two: Flashing the thumbdrive

On a separate computer, download Grml.

Download Rufus and run it.

Make sure the thumbdrive is the device selected in the first field.

Select the Grml .iso file that you just downloaded.

Click on START.

Assuming no errors, you have succesfully flashed the thumbdrive!

Step Three: Shut Down the target computer

This step is important, as otherwise Windows will be mounted as read-only, making the process impossible.

Hold down shift while you click on the shut down button in Windows.

Step Four: Plug in your thumbdrive into the target computer

Step Five: Boot into BIOS to change the boot order

Take note of the brand of computer. Different manufacturers use different keys to access the BIOS.

Look up the BIOS key for the given brand. It should be either F10, F2, Delete or some other related key.

Once you know the key, turn on the computer and begin repeatedly pressing the key until a BIOS interface is displayed.

Find the Boot Order menu. Typically it should be under the Storage or Boot categories.

Following the instructions on screen, move the thumbdrive up to the top of the priority list.

Press F10 to save and quit.

Step Six: Accessing the environment and finding the partition

Once you've saved and quit the BIOS, you should see a Grml splash screen. Press Enter to proceed.

Wait for the output to stop and when prompted, press x.

You should see a graphical environment. Press Ctrl+Alt+F3 to open a virtual console. In case the font size is small, input the setfont -d command to double it. Press Enter after each command.

Type lsblk.

Take note of the partitions based on the size. In a single disk system, the partition you are looking for should be /dev/sda2. In case it isn't, try the other partitions of similar sizes.

Step Seven: Mounting the partition

Make a new folder in which the Windows partition will be mounted: mkdir windows

Mount the partition: ntfs-3g /dev/sda2 windows. In case you get an error, you need to retry the steps from Three onwards, after you input the reboot command.

cd windows/Windows/System32/config

Wait for the command to finish, it will typically take around half a minute to complete due to the size of the System32 folder.

Step Eight: Using chntpw

chntpw -i SAM

A menu should appear, press 1 to edit the users.

Select the user from the table by typing the specific RID found in the first column.

Press 1 to blank the user's password. You can also promote the user to have admin privileges, or just unlock the user, without blanking the password.

Press q twice, and on being prompted to save, press y.

Step Nine: Unmounting the partition and booting back into Windows

Type cd to return to the home folder.

umount windows

poweroff

Remove the USB thumbdrive.

Turn on the computer again. Now you should see that the desired user account is now unlocked, without a password. From here on, you may choose to change the password from the Windows Settings/Control Panel.

Cool Stuff