Tuesday, July 22, 2008

Howto: Reset Local Windows Passwords with Knoppix STD

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.


Mike said...

Hey steve, thank you for this guide. I've used knoppix a few years ago for work and recently I've found myself not able to remember the password on my own desktop, which I haven't used since I got a new laptop. Now the laptop's password is the only thing swooshing around in my head. So thank you for this how-to guide.
The situation I have is like this. There are 2 drives on the desktop machine. Both are ntfs, one is a Boot drive, the other is a normal slave drive. The problem I have is that while I can load Windows from the Boot drive, it is not recognized by Knoppix or any other Linux distro - it is as if it is not there at all. It doesn't matter how many times I reboot, try to use Spinrite or type "cat /etc/fstab" - it doesn't get listed in fstab. Is there anything I can do to make the drive 'appear'? Thank you in advance. Mike.

Anonymous said...

I am guessing that the drive is encrypted?

passwordtech said...

It's uncomplicated to do that.
What you can use for that is a windows password recovery tool.
You can google for a one.

Michael Gade said...

chntpw is a great tool but it doesn't support domain users. I would recommend to use PCUnlocker Live CD.