Monday, July 5, 2010

Resetting windows password using linux livecd

The application that we are going to use is chntpw. In this example, we will be using ubuntu livecd.

1. Put the livecd in the cd/dvd drive and boot your windows machine from the livecd.

2. Once booted, open the terminal and check for tool named "chntpw". If not there, you can install it using:

$ 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:
$ sudo 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.

No comments: