no administrator password for Windows 7
In a nutshell, the solution is to get into command prompt with elevated permissions The command line prompt is...
net user <account> <new password> /active:yes
example:
net user Administrator MySuperSecretPassword /active:yes
... but how the hell do you do that if you don't know the administrators password? You can leverage the installation process...
Check out this answer by Alan Pine at http://community.spiceworks.com/how_to/show/59673-windows-7-8-local-admin-password-reset
He suggests to capitalize on the inherit nature of Admin privs during the installation process as a means of recovery. Summary of steps...
- Use the installation media - DVD or Thumb drive - boot to this - press any key to install...
- Get into the command prompt, and replace the c:\windows\system32\sethc.exe with cmd.exe
- restart the installation process and get back into a command shell. Using the net use command reset
- password and/or reset account activation.
I tried his steps and they worked fine. I had trouble with step 3 - exit and restart and wait for the logon screen. I wasn't sure if I was supposed to enter setup again or not. As it turns out, I entered setup again and did the step 4 sticky key thing. The command prompt did in fact show up for me. I was surprised..
Here are Alan's steps in details...
The following will guide on how to reset a password on a Windows 7/8 machine where you have no/forgotten the local administrator password.
WARNING: Resetting a password of a Windows account means that data that has been encrypted, such as Windows EFS or stored Internet Explorer passwords, will be history. Avoid this by resetting the password of an account that hasn’t been used, such as the built in "administrators" account (none of use that.... right?). Do you use BitLocker to encrypt the drive? If so you will first have to unlock the the drive/partition. If you didn’t use any Windows-based encryption you are safe to reset your password with this information.
1. Boot from Windows 7/8 setup Be sure that your BIOS boot order has your DVD/USB device as first boot device (for Dell, press F2 to enter BIOS) or if you have the ability to select a boot menu (F12 for Dell), then select the appropriate device listing for your case. If not using a Dell machine please refer to your manufactures directions for changing boot order. Using your Windows 7/8 setup DVD or flash drive, turn on the computer, and wait for the message "Press any key to boot from CD or DVD" and press any key.
2. Close Windows Setup Close the Language windows by clicking the X in the in the corner and confirm to cancel the Windows installation. Wait until you see the Windows 7/8 start screen.
3. Getting the CMD Prompt Windows 7/8 setup should greet you and encourage you to configure your language settings at this point Press SHIFT+F10 to open a command prompt, which should show you "X:\Sources" In the CMD Window enter (without " 's) "copy d:\windows\system32\sethc.exe d:\" If you get the error message along the lines of "The system cannot find the specified path" try replacing “d:” in the command above with different drive letters (possibly "e:" or "f:") until the error message disappears Were now going to replace the "Sticky Keys" app on your machine with a CMD prompt, enter "copy /y d:\windows\system32\cmd.exe d:\windows\system32\sethc.exe" (without " 's) Once accepted exit and restart and wait for the logon screen.
4. Sticky Keys power... Activate Press the SHIFT key five times. You should now see the command prompt If your wondering what Sticky Keys are ... http://en.wikipedia.org/wiki/Sticky_keys
5. Find local users Type "net user' to get a listing of user names that reside on your machine.
6. Pick a user to reset From the list, choose a user name that you wish it reset and type "net user user_name new_password", user_name is the one you picked from the table (net user) and new_password is.... something you can remember If the user name or password contains blanks, you have to set it in quotes I.E C:\Windows\system32> net user “Alan Pine” “My Remembered Password”
7. TA DA! You just reset your Windows 7/8 password. Close the CMD window and log on with the aforementioned set "net user" Name and password. If you want to restore your "Sticky Keys" app, return to step one and walk through the process again and use this command in step 2: "copy /y d:\sethc.exe d:\windows\system32\sethc.exe" IN REPLACE OF "copy /y d:\windows\system32\cmd.exe d:\windows\system32\sethc.exe"
Summary
Thanks Alan!
There is still a built-in Administrator account, which is disabled by default. However, when there are no other administrative accounts on the system the built-in Administrator account may become enabled. Go into Safe Mode and see if Administrator appears on the Welcome Screen. If it does, log in and use it to switch your own account back into an admin account.
If Administrator doesn't appear on the Welcome Screen, enable it as follows:
If you have a Windows 7 installation DVD (not a recovery DVD) you can boot the system with it. Select the default language, then choose "Repair your computer". Then select "Command Prompt". At the command prompt type:
net user administrator /active:yes
Remove the DVD, reboot the computer, and log into the built-in Administrator account.
If you don't have a Windows 7 installation DVD (only have a recovery disc), Dell may have given you the Windows 7 System Repair option (not a System Recovery!) on the diagnostic menu. This diagnostic menu is the same one where you can choose Safe Mode. To get to this menu, repeatedly tap the F8 key as the computer is starting up.
After you have fixed your account, log into it and disable the built-in Administrator again for security purposes:
Press Start --> Search box --> type: cmd
When cmd appears in Results above, right-click it and choose "Run as administrator". Now you will get the command prompt. At the command prompt type:
net user administrator /active:no
For reference, this information was taken from answers.microsoft.com but edited by me.