Tip 66: How to reset the Administrator Password

You’ve just applied a patch to your Windows 2000 Professional machine and after reboot you find out you can no longer log on. Windows rejects your password, even though you haven’t changed it. You try the Windows 2000 setup CD-ROM to repair the installation, without great success.

You start the Microsoft Management Console and with the Computer Management snap-in in order to set a new Administrator password, only to receive the error message Unable to change password. Also, none of the Windows 2000 Resource Kit tools is able to fix the problem, and trying to create another account with Administrator rights is equally unsuccessful. You simply can’t change anything related to user accounts.

The Microsoft TechNet article How to Identify User Who Changed Administrator Password (Q173939) explains that Windows 2000 and Windows NT store the Administrator password in the
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F4\F
registry subkey and how to get access to that key.

This presents an opportunity to remedy the problem, especially if your system is already set up to dual boot into a second copy of Windows 2000 or Windows NT, as the case may be.

With the following steps you can regain Administrator access to your original installation:

  • Start your second installation copy of Windows (if needed after installing a temporary one) and reset the Administrator password in that running system to blank.
  • Follow the instructions in Knowledge Base article How to Identify User Who Changed Administrator Password (Q173939) to get access to this registry key structure.
  • Navigate to the HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F4\F subkey and copy the value’s contents.
  • Next, you load the original installation SAM hive, using the Load Hive file menu command, give it a temporary hivename (like MySAM) and paste the copied data into the loaded SAM hive’s HKEY_LOCAL_MACHINE\MySAM\SAM\Domains\Account\Users\000001F4\F registry subkey.
  • Now select the MySAM hive and unload it, using the Unload Hive file menu command, thereby effectively saving any changes in the hive back to the original installation registry.
These actions will have changed the password for the Administrator account in the original installation to blank and after reboot into this installation you will be able to log on as Administrator again.