Thursday, August 04, 2011

Reset your Windows password with SystemRescueCD

So you've forgotten what your Windows password is and can't login to your Windows computer. With SystemRescueCD you can reset your Windows password to regain access to your desktop. It involves using the Linux terminal but the tools aren't too hard to use. Here's how to go about doing it.

Create a SystemRescueCD boot CD

You'll need to download SystemRescueCD from the website from another computer. It's pretty hefty at about 350MB so it might take a while to finish. Burn the ISO image to a CD using your favorite disc burning software. Be sure to burn using the "burn disc image" or "burn image" option instead of the regular data disc method. Once it's done, put the CD into the drive on your computer then boot from it.

Reset the password

You'll boot to a terminal. This is where the magic comes in. First, mount the partition that Windows is installed in.

# mkdir /mnt/Windows
# ntfs-3g /dev/sda2 /mnt/Windows

Windows XP/Vista should be pretty straight forward. Windows 7 usually has at least two partitions. The first is a hidden system reserved partition, while the second is the actual partition where Windows is installed. Replace /dev/sda2 with the appropriate device on your system. Once mounted, you'll be able to edit the registry hives to reset your password.

# cd /mnt/Windows/Windows/System32/config
# chntpw -u username SAM

Resetting Windows password with chntpw

Replace username with the user account you use to login to Windows. You'll be presented with a wizard-style console interface. It really simple. Just opt to blank your Windows password. The change password option should work well on Windows XP but didn't work on Windows 7 when I tried. When in doubt, just blank the password. It's the most reliable option.

When you're done, just reboot and get back to your usual Windows desktop.

# reboot

You should now be able to get to your Windows desktop.