Howmany times have you forgotten a password in the last year? Losing a website password isn't a huge deal, because you can reset those with your email address. But forgetting your computer password is scary, because they're more difficult to reset.
If you've forgotten the password for a Windows administrator account, don't fear. There are several methods you can use to recover it. We'll show you how to reset administrator passwords in Windows, even if you don't have admin rights. While we focus on Windows 10 here, these tips should largely work the same in Windows 11 and other versions, too.
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 here, then proceed with resetting your Microsoft password. Head to the Microsoft password reset page to get started, though you can also reset your password from the Windows login screen by clicking the I forgot my password link.
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 will make it much easier to reset your admin password in the future.
If you don't use a Microsoft account to log into Windows, you'll have to reset the password for a local account. Windows 10 and 11 allow you to set security questions for local accounts that help you get back in easily from the lock screen if you forget the password. If you haven't set those up already, however, they won't do you much good now.
However, if you have another administrator account on the computer aside from the one you're locked out of, you don't need to go through all these steps. In that case, log into the other admin account on your computer and change the password using the command line, which doesn't require jumping through as many hoops.
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.
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).
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 the drive 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 Sticky 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.
In previous versions 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 old 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 or Windows 11, 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 sethc.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 should hopefully bring up the Command Prompt. On Windows 10, this icon looks like the clock icon in the bottom-right of the image below. On Windows 11, it looks like an outline of a person.
Then, you can change the password for an account using the following command. Replace username and password with the actual username of your account and the new password you want to set, per the example after the template:
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, like in the example:
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.
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].
If the above method doesn't work, another way to reset your Windows local admin password is using a Linux bootable USB drive. Using a tool inside the Linux environment, you can set a new Windows password.
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 a moment to start up. Depending on which distro you've chosen, you may boot right into a Linux environment, or have to complete some setup tasks like setting the time zone. If asked to install Linux on your computer, don't do so; click Try or similar to stay in the live environment on your USB drive.
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.
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.
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:
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 and shut down; 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.
3a8082e126