If you see the error “The referenced account is currently locked out and may not be logged on to” when trying to sign in to Windows, your user account has been locked by the system’s security policy. This guide walks you through the exact steps to unlock it, even if you can’t get past the login screen. You’ll need access to another administrator account or the built-in Administrator account to complete the fix.
What You’ll Need
- Access to another account on the same PC with administrator privileges (or the built-in Administrator account).
- Your Windows installation media (USB or DVD) if you can’t access any admin account.
- Basic familiarity with Command Prompt (don’t worry, we’ll give exact commands).
Step-by-Step
- Log in with an administrator account. If you have another account on the PC that is an administrator, use it. If not, restart the PC and press F8 (or Shift+F8) during boot to enter Safe Mode, which often shows the built-in Administrator account. In Safe Mode, select Administrator (it may have no password by default).
- Open Command Prompt as administrator. Right-click the Start button and choose “Command Prompt (Admin)” or “Windows PowerShell (Admin)”. If you’re in Safe Mode, you can also search for “cmd”, right-click it, and select “Run as administrator”.
- Check the current lockout status. Type the following and press Enter:
net user
This lists all user accounts. Note the exact username of the locked account. - Unlock the account. Type the following command, replacing
Usernamewith the actual account name, and press Enter:net user Username /active:yes
This re-enables the account. If the account was disabled, this fixes it. If it was locked due to too many failed password attempts, this clears the lock. - Verify the unlock. Run
net user Username(without the /active flag) and look for “Account active” – it should say “Yes”. Also check “Account lockout” – it should say “False”. - Restart and log in. Reboot the PC and try logging in with the unlocked account using the correct password.
- If the account is still locked, reset the password. From the same admin Command Prompt, type:
net user Username NewPassword
ReplaceNewPasswordwith a strong new password. Then try logging in again. - If you have no admin access at all: Boot from your Windows installation USB/DVD. On the first screen, press Shift+F10 to open Command Prompt. Then follow steps 3-6 using the command prompt from the installer. Note: the drive letters may differ (D: instead of C:), but the net user command works the same.
Common Mistakes
- Typing the username incorrectly. The net user command is case-insensitive, but it must match exactly. Use
net userto see the exact list. - Using the wrong command. Some guides suggest
net user Username /unlock– this is not a valid command. The correct one is/active:yes. - Forgetting to run Command Prompt as administrator. If you get “Access denied”, you’re not in an elevated prompt.
- Ignoring the lockout threshold. After unlocking, if you enter the wrong password again, the account will lock again. Wait for the lockout duration (usually 30 minutes) or reset the password.
Tips
- Use Safe Mode if possible. Safe Mode often gives you access to the built-in Administrator account, which is the easiest way to fix the issue.
- Check the lockout threshold. Go to
secpol.msc→ Account Lockout Policy to see how many failed attempts trigger a lockout and for how long. You can adjust these if you’re an admin. - If you’re using a Microsoft account, the lockout might be on the Microsoft side. Try logging in at account.microsoft.com to reset your password, then try again on the PC.
- Write down the new password if you reset it, and store it securely.
Troubleshooting
“Access denied” when running net user. You’re not in an elevated prompt. Right-click Command Prompt and choose “Run as administrator”.
The account still shows as locked after the command. Run net user Username and look at “Account lockout” – if it says “True”, the lockout hasn’t cleared. Try restarting the PC after the command, or wait the lockout duration (default 30 minutes).
You can’t find the built-in Administrator account. In Safe Mode, it usually appears. If not, you can enable it from another admin account by typing net user administrator /active:yes.
You don’t have a Windows installation USB. You can create one using another PC with the Windows Media Creation Tool. Alternatively, you can use a Linux live USB to reset the password (but that’s more complex).
The error appears even after unlocking. If the account is a domain account (work or school), the lockout might be on the domain controller. Contact your IT admin. For local accounts, ensure you’re using the correct password.
Frequently Asked Questions
Why did my account get locked out?
Windows locks an account after a set number of failed login attempts (default is 10). This is a security feature to prevent brute-force attacks.
How long does the lockout last?
By default, the lockout duration is 30 minutes. However, an administrator can change this or manually unlock the account.
Can I unlock my account without an administrator?
If you have no other admin account, you can use the built-in Administrator account (enable it via Safe Mode) or boot from installation media to run the net user command.
Will resetting the password delete my files?
No, resetting the password with net user does not affect your files. It only changes the password.
Is it safe to use the built-in Administrator account?
Yes, but it’s best to disable it after you’ve fixed your account. Run net user administrator /active:no to disable it again.
What if I’m using a Microsoft account?
If you use a Microsoft account, the lockout might be on Microsoft’s servers. Go to account.live.com to reset your password, then try logging in again. If the issue persists, try the local unlock steps above.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Links Not Opening in Chrome: 7 Top Ways
- How to Add & Remove Favorites in Windows 10 Photos App
- Connect Alexa to a Soundbar: Choose the Right Setup
- Fix Host Process for Setting Synchronization in Windows 10
- Windows 11 search how to control automatic indexing of frequently used folders?
- How to Set Up Tips on Twitter (X) for Android & iOS