====== Ubuntu - Windows - Reset windows password from linux ======
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 the 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 users in the SAM record.
chntpw -l SAM
Interactively edit the user's credentials.
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.