Bharat Balegere 's Undocumented Tech Tips

Change Windows Password from Ubuntu/Ubuntu Live CD

Most Ubuntu users also have Windows installed on their computer.In such cases you can Reset or Change the passwords of Windows User Accounts from Ubuntu/Ubuntu Live CD using the chntpw tool.

You need to enable Read/Write Access to NTFS partition on which Windows is installed, to use the chntpw tool.

Enabling Read/Write Access

Install NTFS GUI Configuration Tool by running this code in the terminal
sudo apt-get install ntfs-config

Applications-System Tools-NTFS Configuration Tool

Tick the NTFS partition where Windows is installed and give a suitable mount point like xp.
Partions are shown as /dev/sda2 /dev/sda3
If you find this confusing,then tick all of them and assign the mount points as xp,xp1 etc.
Click on Apply.
In the next window Tick Enable Write Support for Internal Device.

screenshot-ntfs-config

Now your windows partitions are mounted as xp,xp1 etc

Places-Computer-Filesystem-Media
You can see your windows partitions mounted here as xp,xp1.
Open each one of them and look for the Windows folder.If the Windows folder is in xp then your Windows is installed in that partition.

Installing chntpw

Execute the following command in terminal
sudo apt-get install chntpw

Changing the Passwords

The windows passwords are stored in the SAM file located Windows/System32/config.
Change the directory to Windows/System32/config by
cd /media/xp/Windows/System32/config
Since the path is case sensitive you may get an error saying No such file or directory.Open the above path in the Nautilus File Manager and make a note of the Uppercase and Lowercase characters.Sometime the Windows folder might be named as windows with a lowercase w or as Windows with an uppercase W.

Once you are in the config folder execute the following commands in terminal
ls
It display the list of files in the Config folder.Make sure a file called SAM is present.

To display the list of users execute the following command at terminal.

chntpw SAM-l

chntpw1

To change the password of the Administrator account execute the following command at terminal.

chntpw SAM

And follow instructions on the screen to reset or change and press the appropriate key.Example press 1 to reset the password.

chntpw2

To change the password or make a specific user the administrator run the following command in terminal

chntpw -u USERNAME SAM

and follow the instructions on the screen.

Thats it.Now restart and boot into  Windows and log into the Administrator Account without any problems.

 

Like This Post ?

RSS Digg Twitter StumbleUpon Delicious Technorati Reddit Facebook Mixx Diigo Google Yahoo

11 Comments

Trackbacks and Pingbacks

Leave a Comment


Name (required)

Mail (will not be published) (required)

Website

Comment

Spam Protection by WP-SpamFree