Windows Server 2025:
account locked out,
can't connect over RDP?
Bots constantly try passwords on Remote Desktop. After a few failures, Windows locks the account⦠and locks you out too. Good news: your server is fine, and you can unlock it in 2 minutes from the console in your client area.
Are you affected ?
If you see this message when connecting to Remote Desktop, this tutorial is for you.
The referenced account is currently locked out and may not be logged on to.
The exact wording may vary with your RDP client version.VPS running Windows Server 2025
Or a recent, up-to-date version of Windows Server: lockout of the Administrator account arrived with Microsoft's October 2022 updates.
Your password is correct
And yet the RDP connection fails, sometimes after several days without any problem.
The server responds
Your services (sites, games, apps) are still running: only the Remote Desktop connection is refused.
Why does it happen?
Every server exposed to the Internet receives automated login attempts. Windows applies a lockout policy, including to the Administrator account: it's a protection⦠that ends up locking you out too.
Bots scan
RDP port 3389
They try
"Administrator" + passwords
10 failures
in 10 minutes
Account locked out
for network logins (RDP)
You're locked out
and the bots start again
The key to the fix: according to Microsoft (KB5020282), this lockout only applies to network logins such as RDP. Console login is still allowed, and the noVNC console in your client area is precisely a local login.
The fix on video
Under a minute, no sound needed if you prefer: every step is written on screen.
Chapters
Unlock your VPS step by step
The fastest method: go through the console in your client area, which isn't affected by the lockout.
Open your client area
Log in to your RedHeberg client area, then open your Windows VPS page.
Launch the noVNC console
Click Console (noVNC). A window opens showing your server's screen, as if you were sitting in front of it.
Log in to Windows
Click the Ctrl+Alt+Del button in the noVNC bar (pressing Ctrl+Alt+Del on your keyboard would be intercepted by your own computer), then enter the password for your account Administrator.
Disable the lockout threshold
Right-click the Start button, then choose Terminal (Admin) or Command Prompt (Admin). Type:
C:\> net accounts /lockoutthreshold:0 The command completed successfully.
The number 0 means no number of failures will lock the account any more.
Check, then reconnect over RDP
Make sure the change has been applied:
C:\> net accounts β¦ Lockout threshold: Never # French-language Windows: Seuil de verrouillage : Jamais β¦
Close the console and relaunch your Remote Desktop Connection : you're back into your server.
lusrmgr.msc βΊ Users βΊ Administrator and untick "Account is locked out", or wait a few minutes.Prefer the graphical interface ?
Same settings, different paths. All of these steps are done from the noVNC console while RDP is blocked.
Via Local Security Policy (secpol.msc)Standalone VPS
- Press Win+R, type
secpol.mscand press Enter. - Open Security Settings βΊ Account Policies βΊ Account Lockout Policy.
- Double-click Account lockout threshold and enter 0 to disable it (or a higher value to simply relax it).
- Optional: set Allow Administrator account lockout to Disabled to exempt only the built-in Administrator account.
Domain controller server (Active Directory / GPO)AD domain
On a domain, the rule comes from the Default Domain Policy and applies to every account in the domain.
- Open Group Policy Management:
gpmc.msc. - Right-click Default Domain Policy (or the relevant GPO) βΊ Edit.
- Go to Computer Configuration βΊ Policies βΊ Windows Settings βΊ Security Settings βΊ Account Policies βΊ Account Lockout Policy.
- Set Account lockout threshold to 0 (disabled) or increase it, and adjust the Account lockout duration.
- Apply the policy immediately:
C:\> gpupdate /forceEditing the GPO doesn't unlock accounts that are already locked. To release them immediately (PowerShell as administrator):
# List locked-out accounts PS> Search-ADAccount -LockedOut # Unlock an account PS> Unlock-ADAccount -Identity "User_Name"
Graphically: dsa.msc βΊ double-click the user βΊ tab Account βΊ tick Unlock account βΊ Apply.
Now secure your RDP access
A threshold of 0 removes a protection against brute force: the bots keep trying. Replace it with these three habits, done from the console or an open RDP session.
A long, unique password
16 characters minimum, never reused elsewhere. That's what makes brute force pointless, even without lockout. On French-language Windows, the account is called Administrateur.
C:\> net user Administrator *Restrict RDP to your IP
Only your addresses can then reach Remote Desktop: the bots no longer see anything. Replace the example address with yours (on French-language Windows, the group is "Bureau Γ distance").
PS> Set-NetFirewallRule ` -DisplayGroup "Remote Desktop" ` -RemoteAddress 203.0.113.10
Change the RDP port
Most bots only target port 3389. First open the new port in the firewall, then restart the service.
PS> New-NetFirewallRule -DisplayName "RDP 3390" -Direction Inbound -Protocol TCP -LocalPort 3390 -Action Allow PS> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name PortNumber -Value 3390 PS> Restart-Service TermService -Force
Safety net: make these changes with the noVNC console open. If something goes wrong (wrong IP, port not opened), you still have access to fix it. To connect on the new port: your-ip:3390 in the "Computer" field of Remote Desktop Connection. If you combine both settings, also restrict the new rule to your IP: Set-NetFirewallRule -DisplayName "RDP 3390" -RemoteAddress 203.0.113.10.
Frequently asked questions
Why is this happening now, when everything was working?
Has my server been hacked?
eventvwr.msc) βΊ Windows Logs βΊ Security: events 4625 are failed logins, 4740 are lockouts.Is setting the threshold to 0 dangerous?
net accounts /lockoutthreshold:30.I can't use the noVNC console
Are Windows Server 2022 or 2019 affected?
Still locked out?
We'll handle it.
Open a ticket from your client area or join us on Discord.