Tuesday, July 22, 2008

Howto: Reset Local Windows Passwords with Knoppix STD

***THIS HOW TO IS FOR COMPUTERS YOU HAVE THE RIGHT TO RESET PASSWORDS ON*** ***DO NOT USE THIS FOR EVIL***
From time to time I will run across a computer that I need to get Administrator access to, but I have no clue to the password. The easiest thing to do is simply reset it and if there is another administrator user I can open a command prompt and run "net user administrator newpassword" and be all set.

For those other times I have to use Knoppix STD to reset the password. It takes roughly 5 to 10 minutes to do this, but has worked everytime I have needed it to.
Download Knoppix STD.
Burn ISO to CD
Boot from the CD
Right click on the desktop and choose XShells, Root Aterm.
Type "cat /etc/fstab" and look for a NTFS drive like /dev/hda1 or /dev/sda1
Type "mount -o rw /dev/hda1" or whatever drive you need to mount.
Type "cd /mnt/hda1/" This will put in the "C" drive of the windows machine.
Type "ls" and look for either Windows or WINNT. Remember that in linux case matters so use what ever case you have.
Type "cd Windows/system32/config" If this fails cd one level at a time and use "ls" to find the case of the next directory.
Type "ls" once in /mnt/hda1/Windows/system32/config to find the case of three files. The three files you need are SAM, SECURITY, and SYSTEM. They will not have an extension on them.
Now to actually change the password.
Type "chntpw -u Administrator SAM SECURITY SYSTEM
It will prompt you to disable the SYSKEY, hit N for no.
chntpw will then prompt you for the new password, use * to blank it or type the new password.
Hit Y to really change the password.
Hit Y to write hive files.
Right click on the desktop again and choose "Reboot".

Once the reboot is complete you should have administrator access to the computer.