Windows 10 comes with two types of user accounts. One is a standard or guest user and the other is an administrator account. Even if you are the owner of the computer, it is safer to use your computer with a Standard user account for safety reasons. But, what happens when you accidentally delete the administrator account? How to recover deleted admin account?
It’s a tough one, I admit. You can only create standard user or administrator accounts through the administrator account. Now that you have deleted it, there is no way to create a new account. It’s like a catch 22.
Let’s get started.
1. Built-in Administrator Account
It seems that the developer team working at Microsoft foresaw this situation to come. That’s because they developed a built-in administrator account in Windows that you can’t delete or mess with it. Search and open Command Prompt with administrator privileges. Right-click or select Run as administrator in the search results itself to do so.
Give below command to enable built-in administrator account.
network/activity user admin: yes
Wait for the process to complete. Now issue this command to make your existing standard user account an administrator account. Replace UserName with your current account name.
network local group administrator Username / add
Try creating a new user account with administrator rights. If successful, issue below command to disable built-in administrator account.
network/activity user administrator: no
If you can’t even run Command Prompt with admin rights or the option is greyed out, try this.
Click the Start menu, press and hold the Shift key, and then select Restart. This will boot your computer directly into the Windows 10 Recovery Environment.
You will now select Troubleshoot > Advanced options > Command Prompt.
See if you can issue the above commands now, and if it works, create a new user with admin rights right away. Don’t forget to disable the built-in admin account as discussed.
2. Local Privacy Policy
If Command Prompt still doesn’t work, here is another way. Search for Local Security Policy in the Start menu and open it.
See detailed directory structure below.
Security Settings > Local Policies > Security Options
Check if the Account status: Administrator account is enabled. If not, double click to open and change Privacy Settings to Enabled here.
3. Hack the registry
Still no fun? Wait, I get it. This trick will work for most users. Backup to an external hard drive first. I keep saying it but can’t emphasize enough.
Reboot the computer into the Windows 10 Recovery Environment as you did in the step above. Open Command Prompt again and issue this command.
re-edit
That will open the Registry Editor. Select HKEY_LOCAL_MACHINE. Don’t double click as that will expand it.
Click the File menu button and select Load Hive.
Navigate to the following directory structure.
System Root Drive > Windows > System32 > config
Select the file named SAM (Secure Account Manager) and click Open.
You will be asked to name it now. Name it REM_SAM. Don’t forget this name. Now navigate to the folder structure below.
HKEY_LOCAL_MACHINE\REM_SAM\SAM\Domains\Accounts\Users\000001F4
Highlight the 000001F4 key and in the right window pane double click on the F DWORD file to open it.
You need to place the cursor on line 0038 under Value data right after the value 11. Press the delete key to delete the number and enter 10. Save. Close everything and restart your computer. You will now have administrative rights. Create a new user with admin rights and go back to revert the changes.
4. Reset the computer
This is unfortunate but there’s really nothing you can do now. I recommend backing up everything on your hard drive just to be on the safe side. You will have to reset your computer. You can go to Advanced Startup Options as shared in the step above or follow the other way shared below.
Press Windows key + I to open Settings and click Update & Security.
Click Start under the Reset this PC heading under the Recovery tab.
Click Delete everything.
In the next screen, you can confirm or click Change settings to select the option to erase only the C drive. That’s usually where Windows is installed.
Follow the on-screen instructions that then involve agreeing to reset the PC.
Make sure your computer is connected to a power source as this may take some time.
Note: If you don’t see Erase everything and reinstall Windows in Recovery, you need to click Advanced startup and then select Reset. Why? That’s because you don’t have admin rights.
Admin is always right
Losing your administrator account can be scary. To make sure it never happens to you again, create two admin accounts this time. That way, if you accidentally delete again, there’s always a backup to fool around.
Next: Want to change your computer’s administrator password? Click the link below to learn how.
Categories: How to
Source: thpttranhungdao.edu.vn/en/