Tuesday, 29 January 2013

Change windows 7 user account password from linux

The below post describes the method i used to change the windows 7 administrative account password for the username ashwin.

First i tried to view the password , so that i dont have to change the password. So i downloaded the ophcrack and burned it into disk. Then upon booting from disk i found that it was smart to show the user account that exists and it correctly shows the accounts with blank password. But it failed to show the password for ashwin account. This happened even after loading of all tables and it took 10 mins to load the tables. So ophcrack failed for me.

The next step i tried was to nuke the password. For which my linux partition helped me. I had the laptop dual boot with linux. I booted into the linux partition and mounted the windows c drive. I used the package management software ( pacman in my case ,  other popular package management tools commonly found are yum and apt-get) to install chntpw. Then i did the below:

             #mount -t ntfs /dev/sda2 /windows/c/
             #cd /windows/c/Windows/System32/config/
             #chntpw -u ashwin SAM
             i choose 1 and then write to sam and then reboot into windows.

Now i am able to login to windows ashwin account and change the password as desired. 

Make sure you use the right device number in the above mount command. Mine was /dev/sda2 , yours could be different (most likely it will be different).

No comments:

Post a Comment