Forgetting the Administrator password can range from a nuisance to a complete disaster. If you’ve just performed a clean install of Windows 2000, forgetting the Administrator password you assigned during Setup is a nuisance—you can simply perform the installation again, losing an hour or so but no data or accounts. If you upgraded your previous installation or if you’ve been using the system for a while, forgetting the Administrator account can be a real problem. In this situation, recovering from the problem relies a lot on preparation before the fact. Even without any preparation, however, you can recover the system through the use of some third-party utilities.
Before you agonize over the lost password, take a few seconds to check for a simple mistake. If you’re relatively certain of the password but it won’t work, check the caps lock key. The password is case sensitive. If the caps lock key is off, try entering the password with it on. You might have inadvertently had the caps lock key on when you entered the password for the Administrator account during installation. If so, log on and change the password to be lowercase using the Users and Groups branch of the Computer Management console.
Hopefully, you have at least one other account that is a member of the administrators group. If so, you can simply log in using that account and change the password for the Administrator account using the Local Users and Groups branch in the Computer Management console.
If you can boot the system and get read/write access to the system folder (the one containing Windows 2000), you can delete from the registry the Security Account Manager (SAM) hive, which contains the accounts. You’ll lose all accounts other than the Administrator account (which will then have a blank password), but at least you’ll be able to boot the system and access your applications and data without having to reinstall Windows 2000. You should not consider using this procedure on a server with numerous accounts that would be difficult to recreate. In that situation, see Section 1.11.4.
You can’t use the Recovery Console to delete the SAM, since the Recovery Console requires the Administrator password to log on to the selected Windows 2000 installation.
Follow these steps to delete the SAM hive:
Boot the system using a bootable DOS/Windows 9x diskette (FAT volumes only) or a bootable disk with a driver capable of reading NTFS volumes (such as Winternals’ ERD Commander—see http://www.winternals.com).
At the command prompt, change to the
sam.old to rename the SAM, or simply delete
Restart the system.
At the Windows 2000 logon prompt, enter the Administrator account with no password.
After logon, open the Local Users and Groups branch of the Computer Management console, change the Administrator password, and recreate any lost accounts.
If you can boot the system with an account that has the ability to back up the system, you can reinstall Windows 2000 to assign a new Administrator account and password, then restore the backup set to recover your application settings. Since Windows 2000 Backup doesn’t require a tape drive like Windows NT’s version, you can back up to a local file or network server, provided you have enough space to contain the system.
This option is useful on systems with NTFS boot volumes when you don’t have a means of booting to a floppy with NTFS support.
Before you go this route, consider the catch: you’re going to lose all accounts in the original installation. If you’re dealing with a workstation with only a few accounts, it’s not critical. You can easily recreate the accounts after reinstalling Windows 2000. On a server with numerous accounts, however, you should strongly consider the solution in Section 1.11.4, which will enable you to retain all of your current accounts and does not require reinstallation of the OS.
Here’s how to reinstall Windows 2000 while retaining your program and customization settings:
Boot the system using the account that has the necessary permissions and rights to back up the system. Back up the Windows 2000 folder as well as the Documents and Settings folder.
Run Setup and install Windows 2000 either to a new folder or to the original location. Don’t forget the Administrator password you assign during Setup!
After installation boot the system and run Backup. Start the Restore wizard and click Next. In the Restore Wizard dialog, click Import File. Locate the backup set you created in step 1 and restore it. If you installed Windows 2000 to a new folder, remember to redirect the files to the new folder rather than the original one.
After the restoration is complete, restart the system and log on with the new Administrator password, then check your system to make sure your applications run properly.
If reinstalling is not an appealing solution or you don’t have an account that can back up the system, there is one other method you can use to recover the system. This option is most useful if you’ve been working with the system for some time and don’t want to lose or have to recreate the current configuration. It’ll cost you a little money, but that could be a small price to pay if you simply can’t go through a reinstall.
While there are multiple tools on the market for Windows 2000 repair and recovery, two products from Winternals (http://www.winternals.com) are targeted specifically at system recovery. Both ERD Commander Professional and NTRecover with the NT Locksmith add-on provide a means of changing any password, including the Administrator account. In addition, both tools provide the ability to boot a completely dead system and recover data from the system. Check out Winternals’ Web site for more information about their products.