It’s scary to forget your password, but you can still choose to re-enter it. Here are three ways to reset the administrator password in Windows.
How many times did you forget your password last year? Losing website passwords is no big deal, because you can reset them using your email address. But forgetting computer passwords is scary because they are difficult to reset.
If you forget the password for your Windows administrator account, don’t be afraid. You can use various methods to restore it. We will show you how to reset the administrator password in Windows, even if you don’t have administrator rights.
1. Reset the Windows Administrator Password With a Microsoft Account
One of the major benefits of using a Microsoft account with Windows 10 is that you can reset your password by going through Microsoft’s tools without much hassle.
First, make sure that you really can’t access your Microsoft account (perhaps your keyboard has a stuck key or something similar). Go to login.live.com on your phone or another computer and try to sign in with the Microsoft account you use on your PC, making sure you don’t mistype anything.
If you still can’t get in, then proceed with resetting your Microsoft password. Head to the Microsoft password reset page to get started, though keep in mind you can also reset your password from the Windows 10 login screen now.
After confirming your identity with the details you’ve provided on your account, this page will walk you through resetting your Microsoft account password. Once that’s done, use the new password to sign into your PC.
It’s worth noting that if you have a Microsoft account, you should take a few minutes to update your security info on your Microsoft account page. Adding a phone number and secondary email address gives you options to reset your password easily; without them, it’s much more of a hassle. A little bit of forethought now makes it much easier to reset your admin password in the future.
2. Reset a Local Windows Admin Password Using the Lock Screen Workaround
If you do not use a Microsoft account to log in to Windows, you must reset the password for the local account. Windows 10 allows you to set security questions for local accounts, if you forget your password, this will help you easily recover from the lock screen. However, if you haven’t set them yet, they are of little use to you now.
If the locked account is the only administrator account on your PC, you first need to use a workaround to launch an elevated command prompt. We discuss this process below.
However, if you have an administrator account on the computer other than the one that is locked out, you do not need to do all of these steps. In this case, log into another administrator account on your computer and use the command line to change the password. You don’t need to skip so many steps.
Setting Up the Password Reset Workaround
First, you’ll need to create a bootable Windows 10 disk on a flash drive. This will obviously require another computer, since you can’t get into yours.
Once you’ve made that, insert the drive into your PC so you can boot from the new installation. On most machines, you need to press F12 or a similar key as soon as you power on your computer to choose a device to boot from.
Boot from your flash drive, let the Windows installer load, and when you see the initial Windows Setup screen, press Shift + F10 to open a Command Prompt.
Next, you need to know which partition your Windows installation is on. Usually, this will be the C: drive, but it might be different for you. To check, type the following command, which will change the current directory of the Command Prompt to the root of the C: drive (or whichever letter you insert).
cd /d C:
If the command returns The system cannot find the drive specified, then that letter isn’t right; try D and continue down the alphabet. Once you find the right drive, you’ll want to change the directory again using the cd command. Type this line to access the System32 folder:
If you see The system cannot find the path specified, you’ve selected a drive other than the one Windows is on. Change drives to a different letter and try again until you find the right one.
Once you’re in the System32 folder, you can pull a little trick. Windows includes an accessibility feature called Sticky Keys, which you can launch by hitting the Shift key five times quickly. By swapping the executable that runs Sticky Keys with a link to the Command Prompt’s executable file, you can run a command line to reset your password right from the login screen.
To do this, type these two commands, one at a time. The first backs up the Sitcky Keys shortcut in the C:\Windows folder (the .. is a shortcut to move to the parent folder) so you can restore it later; the second replaces the Sticky Keys shortcut with a Command Prompt shortcut. If asked to give approval for either, do so.
copy setch.exe .. copy cmd.exe setch.exe
You’re done here, so type this command to reboot the computer and head back to the normal sign-in screen:
Running a Command Prompt to Change Your Password
In previous version of Windows, you could simply run the renamed shortcut to access a Command Prompt right from the login screen. However, Microsoft Defender now blocks these attempts, so there’s an extra step required. If you’re on an older version of Windows 10, or still using Windows 8 or earlier, you can press Shift five times on the login screen to open a Command Prompt.
On modern versions of Windows 10, though, you’ll have to reboot into Safe Mode for this to work. To do this, click the Power menu in the bottom-right corner of the login screen. Then, hold the Shift key and click Restart. If you see a warning that restarting may cause people to lose work, click Restart Anyway.
Then, you’ll see the advanced settings menu. Click Troubleshoot > Advanced Options > Startup Settings, then Restart. Your PC will reboot, then ask which startup option you want to use. Hit the 4 key to select Enable Safe Mode. This loads Windows with only the essential drivers and services, preventing Microsoft Defender from blocking the workaround.
When you reboot to the Windows sign-in screen in Safe Mode, hit Shift five times quickly. This should bring up a Command Prompt, which has administrator access. If this doesn’t bring up the Command Prompt, repeat the steps in the above section, but use utilman.exe instead of setch.exe as the file you rename. Then, reboot into Safe Mode and click the Ease of Access icon at the bottom-right of the login screen, which will hopefully bring up the Command Prompt.
Now you can reset your account password, create a new account, or perform similar actions. To reset your account password, first type net user to see all accounts on your machine. Then, you can change the password for an account using the following command. Replace username and password with the username of your account and the new password you want to set:
net user username password
If you want to create a new user, whether as a backup or because your main account isn’t working properly, enter the following. Again, swap username and password for the new user’s name and new password:
net user username password /add
Then, run this command to make the new user an admin:
net localgroup Administrators username /add
Now, you’ve changed your account password and can log back in using it. Since you don’t want to work in Safe Mode, reboot your computer and sign back in again as normal.
Putting Sticky Keys Back to Normal
Once you’ve successfully logged into your own account or created a new one, you’re almost done. The only step left now is to put the shortcut back.
Load into your computer with the account you’ve regained access to. Then, search the Start menu for cmd and click Run as administrator when it appears in the results. Provide admin permission to open an elevated Command Prompt.
Then, use this command, to put the Sticky Keys shortcut back:
Robocopy C:\Windows C:\Windows\System32 sethc.exe /B
Robocopy is a more robust copying operation that’s necessary to use since you’re changing a system file here. After you run the command, pressing Shift five times should bring up the Sticky Keys window again, which means you’re back to normal.
If you created a new account, you can recover your files, by browsing to your old user directory in File Explorer. Go to C:\Users\[Old Username] and copy everything you need to your new account under C:\Users[New Username].
The backup setch file is still located under C:\Windows, but this isn’t hurting anything. Feel free to delete it if you like; just don’t delete the actual file located in the System32 folder.
3. Reset the Password by Booting Into a Linux USB
If the above method doesn’t work, another way to reset your admin password is using a Linux bootable USB drive. Using a tool inside the Linux environment, you can your Windows password.
Create a Drive and Boot Into Linux
First, you’ll have to make a bootable Linux USB drive on another computer. It doesn’t matter which flavor of Linux you use; if you’re not sure, Ubuntu and Mint are two beginner-friendly options.
Once you’ve made the USB drive, start up the locked PC and look for the prompt to press F12, ESC, Delete, or similar to choose your boot device. See the linked guide above if you need to change the boot order on your PC.
After choosing to boot from USB, give Linux some time to boot. Depending on the distribution you choose, you can either boot directly into the Linux environment, or you may have to complete some configuration tasks, such as setting the time zone. If it is necessary to install Linux on your computer, please do not do so, click “Try” or a similar method to stay in the real-time environment.
You must open the file browser application of your operating system. In Ubuntu, this is the folder icon on the left sidebar. If you are using Mint, there is a folder icon in the lower left corner, just like Windows.
Mount Your Windows Drive
With a file explorer window open, press Ctrl + L to edit the Location path and type this to see all your drives:
Find the drive that you have Windows installed on. If you only have one hard drive in your computer, it will be the only one present. In the below example, File System is the Linux environment, so VBox Harddisk is the correct Windows drive.
Right-click on your Windows drive and choose Mount so Linux can access it.
Reset Your Windows Password From Linux
From here, you’re going to work in the Linux Terminal. Don’t worry—it’s not scary, even if you’re new. The shortcut to open the Terminal in Mint and Ubuntu is Ctrl + Alt + T.
First, you need to install a password reset utility called chntpw. Type this command to install it:
sudo apt-get install chntpw
Next, you need to change the working directory (the cd command stands for change directory) to your Windows folder. To get the right location, go back into the file browser and open your Windows drive. Drill down into the Windows > System32 folder. Now, click inside the address bar at the top of the file browser window and use Ctrl + C to copy the address.
Back in the Terminal, right-click and Paste the address you copied, placing it after the cd command. You’ll also need to add /config at the end of the address; this folder doesn’t always show in the visual file browser, but adding it manually will work.
All told, the command you run should look like this:
Next, get a list of Windows users by entering this (the character before SAM is a lowercase “lima”):
sudo chntpw -l SAM
You should see the user whose password you want to reset in this list. To ensure that you make edits to this user only, type the following command, replacing USER NAME with the one you need to edit. If it’s a one-word username like “Mike”, you don’t need any quotation marks. For multi-word usernames like “Mike Jones,” place quotes around the words or it won’t work:
sudo chntpw -u "USER NAME" SAM
At the next prompt, type 1 and hit Enter. This will clear the user’s password, allowing you to log in without one. Hitting 2 will unlock the user’s account, but this is only applicable if the account is disabled. And if needed, you can use 3 to make the user an admin.
Enter q to exit the chntpw prompt, then y to save your changes. Now you’re done in the Linux environment. In Mint, click the Menu button in the bottom-right to find the power options; in Ubuntu, the power icon is at the top-right.
Reboot into Windows and you can sign into your account using the blank password. Once inside, you should head to Settings > Accounts > Sign-in options and choose Password to set a new password, as leaving your account with no security isn’t smart.
How to Avoid Losing Your Windows Password in the Future
Although these methods are not very difficult, they are very inconvenient. You don’t want to lose your passwords again in the future and you will have to trust them. There are several ways to prevent you from resetting your Windows password on the fly.
First of all, if you have not signed into Windows 10 with a Microsoft account, we recommend that you do so. This way, if you forget your password, you can easily reset it through the web interface.
Even if you don’t use a Microsoft account, setting a PIN on your Windows account will provide you with another sign-in option that is easier to remember.
We also strongly recommend using a password manager to store all passwords securely. When using a password manager, you only need to remember a few passwords, not dozens or hundreds.
Finally, Windows also allows you to create a password reset disk to avoid these lengthy troubleshooting methods in the future. Insert the flash drive, and then find the password reset disk in the start menu to start the password reset disk creation tool.
Follow the steps below to create a restart disk using a flash drive. If your account is locked in the future, you can connect the drive to regain access. This will work no matter how many times you change your password, but remember that anyone who owns the drive can use it to access your account. Stay safe!
Forgotten Administrator Password in Windows? No Problem
Forgetting the password is not fun, and resetting the Windows administrator password is also very troublesome. But at least it is possible. Anyone can take a moment to use these methods, and they are much better than completely reinstalling Windows because it is locked. With a little preparation, you can prevent this from happening again in the future.
Related: How to Fix “This Device Cannot Start (Code 10)” Error in Windows