Tuesday, August 10, 2010

Resetting windows password using linux livecd

1. Put the livecd in the cd/dvd drive and boot your windows machine from the livecd.
(The application that we are going to use is chntpw. In this example, we will be using fedora/ ubuntu livecd.)
2. Once booted, open the terminal and check for tool named "chntpw". If not there, you can install it using:
$ yum install chntpw (if your using ubuntu live cd $ sudo apt-get install chntpw)

3. After the tool is ready, mount the windows partition. Use "fdisk -lu" to check which partition should be mounted. To mount /dev/sda1 (assuming your windows partition is on /dev/sda1), use below command:
$ su mount /dev/sda1 /mnt

4. Find SAM file on the windows partition. Usually it is located in Windows/System32/config. Run the chntpw on the SAM file.
$ cd /mnt/Windows/System32/config
List all user in the SAM record
$ chntpw -l SAM
Interactively edit user credential
$ chntpw -i SAM

5. Follow the wizard of chntpw and clear administrator or any user's password that you want to access.

6. Save changes and restart machine. You can access the windows without password for administrator and users that you have cleared their password. Make sure you take out the livecd, otherwise the machine will boot into it instead of windows.

chntpw
chntpw version 0.99.6 080526 (sixtyfour), (c) Petter N Hagen
chntpw: change password of a user in a NT/2k/XP/2k3/Vista SAM file, or invoke registry editor.
chntpw [OPTIONS] [systemfile] [securityfile] [otherreghive] [...]
 -h          This message
 -u    Username to change, Administrator is default
 -l          list all users in SAM file
 -i          Interactive. List users (as -l) then ask for username to change
 -e          Registry editor. Now with full write support!
 -d          Enter buffer debugger instead (hex editor),
 -t          Trace. Show hexdump of structs/segments. (deprecated debug function)
 -v          Be a little more verbose (for debuging)
 -L          Write names of changed files to /tmp/changed
 -N          No allocation mode. Only (old style) same length overwrites possible
 

6 comments:

Unknown said...

I also know there are many ways. Sure, I get some advices about windows password reset to help lots of users probobaly. Frist of all, we must use some better windows password reset tool or windows password reset software to reset windows password, reset windows admin password, and reset forgotten windows password. Then we don't need to reinstall windows system when we forgot windows password and lost windows password. Surely, no matter we want to remove windows password or change windows password in Windows XP, Windows Vista or Windows 7, we also use this software to accomplish. There are many people don't understand the details which the article tell us how to recover windows password and how to reset windows password. Or, some parts of the writting are understood, some parts are not, for example, how shall we do when forgot windows xp password, reset Windows 7 password or reset password windows 7? In fact, we can use a password reset disk, windows password reset disk and windows password reset disk to reset Windows Vista password, certainly, you should create windows vista password reset disk for Vista system. I hope these I only known can help someone who needs help. Meanwhile other advices can also be valueble. Only in this way, resetting windows password is no more difficult!

Anonymous said...

very helpful sir....thx a lot

Anonymous said...

This is just what I was looking for...we use Fedora to view RAID for clients in need from time to time, and this might come in handy. Thanks for posting!

brlababit said...

I tried chntpw in Ubuntu and Fedora LiveCDs but Windows 7 Ultimate would still throw me this message "The user name or password is incorrect."

HELP.

Anonymous said...

Very,very useful tool, I tried on Fedora 17 and worked perfectly.

Thanks

Anonymous said...

Thank you very useful tool