Sunday, May 30, 2010
Use Ubuntu to Unlock Windows XP Account, Clear Account Password
Recently I had to get back into the XP partition on my dual boot set up with XP & Ubuntu on the Samsung NC10. I quickly realized that I'd forgotten my XP password but thanks to the fact I had Ubuntu installed on the same HDD I was able to use the Linux command line program chntpw to unlock the user account.
Just boot into the Ubuntu OS (you can also boot the live version on a DVD or USB key if you don't have it already installed in a dual boot). For this solution we'll use a command line program called chntpw. You'll want to install this first if it isn't already. At the command prompt type
sudo apt-get install chntpw
then follow the prompts to complete the install.
While still in the Ubuntu OS, open a terminal window and from the command prompt navigate to the necessary directory in the Windows file system by entering the following syntax:
cd /media/path/to/disk/WINDOWS/system32/config/
cd is the command for 'change directory' and then a space then the path to the directory. In my case since I had Ubuntu already installed on the same HDD I had to mount that partition then use its name which was 72ECE49EECE45DBB. So my exact path was:
cd /media/72ECE49EECE45DBB/WINDOWS/system32/config.
Once I was in that directory I ran:
sudo chntpw -u username SAM SYSTEM
replacing username with the specific Windows account username. From the output I had to first select what you will see listed at the very bottom as option 4 to unlock the account since my multiple password failures had locked it, then ran it again and chose 1 to clear the password.
*Important note: my Windows user name had a space in it so I had to enclose it in quotes like:
# sudo chntpw -u "my username" SAM SYSTEM
Anytime you write something at the command line that should be recognized as a single term but includes a space you have to enclose it in quotes so the terminal will know it is a single term.
here is the last part of the output from # sudo chntpw -u username SAM SYSTEM.
- - - - User Edit Menu:
1 - Clear (blank) user password
2 - Edit (set new) user password (careful with this on XP or Vista)
3 - Promote user (make user an administrator)
4 - Unlock and enable user account [probably locked now]
q - Quit editing user, back to user select
Select: [q] >
Then you can restart, boot into the Windows side and your account will be unlocked.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment