Friday, April 06, 2012

How to activate a locked Windows Administrator account

So you've forgotten your Windows account password and want to get in through the default Administrator account. On Windows Vista/7, it's locked by default so you can't login using the account. To get in, you'll need to first unlock the account.

Here's how.

Installing chntpw

There's a nice little command line tool for tweaking Windows accounts called chntpw. It's no installed by default so you'll have to first install it.

Open up Software Center and enable the universe repository in Software Sources if you haven't already. If Software Center doesn't update the local package index, you can do it yourself from terminal. You'll install chntpw the same way.

~$ sudo apt-get update
~$ sudo apt-get install chntpw

Before proceeding, you'll need to mount the Windows partition. Note down the path (for example, the mount may be /media/Windows if the partition is labeled Windows).

Unlocking Administrator

Still in terminal, run the utility and pass it the mount point you noted previously.

~$ chntpw /media/Windows

You'll have a few options presented. Choose to unlock the account, then quit the tool. It'll ask you if you want to write changes to hive. Of course you do; it's why you're here, isn't it?

Reboot into Windows and you should now have Administrator listed on the login screen.

Relocking Administrator

Don't fancy keeping the Administrator account on your login all the time? You can re-lock the account from command prompt. Run the following command to re-lock the account.

:\> net user administrator /active:no

It'll be gone the next time you boot Windows.