Event 4625 says a logon failed, 4776 says a domain controller rejected NTLM credentials, and 4740 says the account is now locked out. The hex status codes in those events tell you why, and a few fields tell you where the attempt came from. This quick reference decodes the codes Microsoft documents for these events and then walks through tracing a lockout back to the device or service that still holds an old password.
Codes in this quick reference
0xC000006D: logon failure, bad user name or authentication information (read the Sub Status)Security log (4625 / 4776)Failure Reason: Unknown user name or bad password.Security log (event 4625)0xC000006A: user name is correct but the password is wrongSecurity log (4625 / 4776)0xC0000064: the user name doesn't existSecurity log (4625 / 4776)0xC0000234: account locked outSecurity log (4625 / 4776)The referenced account is currently locked out and may not be logged on to.Windows sign-in screen0xC0000072: account disabled by administratorSecurity log (4625 / 4776)0xC0000193: account expiredSecurity log (4625 / 4776)
+ 13 more codes in the tables below.
How to read these codes#
| Event | Logged on | What to read |
|---|---|---|
| 4625 An account failed to log on. | The computer where the logon was attempted: workstation, member server or DC (Audit Logon, Audit Account Lockout) | Status and Sub Status, Failure Reason, Logon Type, Caller Process Name, Workstation Name, Source Network Address |
| 4776 The computer attempted to validate the credentials for an account. | The computer that owns the account: the DC for domain accounts, the local computer for local accounts (Audit Credential Validation, NTLM only) | Error Code and Source Workstation, the computer the attempt came from (the target server isn't shown) |
| 4771 Kerberos pre-authentication failed. | Domain controllers | Failure Code 0x18 is a wrong password over Kerberos; Client Address is the sender. See Kerberos error codes |
| 4740 A user account was locked out. | DCs (including the PDC emulator), member servers and workstations (Audit User Account Management) | Caller Computer Name: the computer whose logon attempt triggered the lockout |
When Status is 0xC000006D, the Sub Status holds the real reason. The Logon Type points to what made the attempt:
| Logon Type | Usually means |
|---|---|
| 2 Interactive / 7 Unlock / 11 CachedInteractive | Someone at the keyboard, unlocking a session, or a logon with cached credentials |
| 3 Network | A share, mapped drive or network application; check Source Network Address |
| 4 Batch / 5 Service | A scheduled task or a service running with stored credentials |
| 8 NetworkCleartext | An application passed the password to Windows in unhashed form |
| 9 NewCredentials / 10 RemoteInteractive | runas-style alternate credentials / Remote Desktop |
Bad user name or password#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
0xC000006D | Generic logon failure: bad user name or authentication information. Failure Reason Unknown user name or bad password. | The Sub Status says which: 0xC000006A or 0xC0000064. In 4776 it can also be a LAN Manager authentication level mismatch between source and target | Sub Status, then Logon Type and Source Network Address |
0xC000006A | User name is correct, password is wrong | A typo, or a device, service, task or session still using an old password. Counts toward lockout | Workstation Name, Source Network Address, Caller Process Name |
0xC0000064 | The user name doesn't exist | Typo, deleted or renamed account, wrong domain. A run of these can be account enumeration | The name as typed and where it came from |
0xC0000234 | Account locked out (Failure Reason Account locked out); users see The referenced account is currently locked out and may not be logged on to. | Too many bad passwords reached the lockout threshold | Find the source (below) before you unlock |
Account state and restrictions#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
0xC0000072 | Account disabled by an administrator | An offboarded user or retired service account that something still uses | Get-ADUser name -Properties Enabled, then find what still uses it |
0xC0000193 | Account expired | The account's expiration date has passed | AccountExpirationDate on the account |
0xC0000071 | Password expired | Password older than the maximum password age | Change it; for service accounts, update every stored copy |
0xC0000224 | User must change password at next logon | The flag is set; network and service logons can't prompt for a new password | Change it interactively, or clear the flag |
0xC000006E | Account restriction (STATUS_ACCOUNT_RESTRICTION) | The credentials are valid but a restriction, such as time of day, blocks the logon | The Sub Status names the restriction |
0xC000006F | Logon outside authorized hours | Logon hours set on the account | The account's Logon Hours |
0xC0000070 | Logon from an unauthorized workstation | The account's Log On To list doesn't include this computer | The Log On To list |
0xC000015B | Not granted the requested logon type (logon right) on this machine | User Rights Assignment, for example a missing "Allow log on through Remote Desktop Services" or an applied "Deny log on" right | gpresult /h report.html on that machine |
0xC0000413 | The machine is protected by an authentication firewall; the account isn't allowed to authenticate to it | A trust with selective authentication, and the account lacks "Allowed to authenticate" on the computer object | That permission on the target computer |
Domain controller, time and trust problems#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
0xC000005E | There are currently no logon servers available to service the logon request | The computer can't find or reach a DC: DNS, network, sites or DC outage. An availability problem, not usually a security one | nltest /dsgetdc:contoso.com on the computer |
0xC0000192 | Logon attempted, but the Netlogon service wasn't started | Netlogon stopped or disabled | Get-Service Netlogon |
0xC0000133 | Time difference with the DC too large (STATUS_TIME_DIFFERENCE_AT_DC) | The computer's clock has drifted too far from the domain controller's | w32tm /query /source, then w32tm /resync |
0xC000018C | Trust between the primary domain and the trusted domain failed (STATUS_TRUSTED_DOMAIN_FAILURE) | A broken or unreachable domain trust | nltest /sc_verify:fabrikam.com on a DC of the trusting domain |
0xC000018D | The trust relationship between this workstation and the primary domain failed. | The computer's password no longer matches its AD account, for example after restoring an old snapshot or when another computer uses the same name; Netlogon event 3210 in the System log | Test-ComputerSecureChannel -Verbose; repair with -Repair -Credential (Get-Credential) |
0xC0000371 | The local account store doesn't contain secret material for the account (4776) | Microsoft's table gives no further detail | Which account and Source Workstation are involved |
Microsoft's broken trust relationship guide covers recurring secure channel failures, and Domain trust failures after KB5124008 covers the 2026 Windows 11 case. Any other code is an NTSTATUS value: look it up in Microsoft's NTSTATUS values list.
Trace an account lockout to its source#
1. Read 4740 on the PDC emulator#
The PDC emulator sees the lockout, so start there. In the event XML, the Caller Computer Name is stored in the TargetDomainName field:
$pdc = (Get-ADDomain).PDCEmulator
Get-WinEvent -ComputerName $pdc -FilterHashtable @{LogName='Security'; Id=4740} -MaxEvents 50 |
ForEach-Object {
$d = @{}
([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
[pscustomobject]@{ Time = $_.TimeCreated; User = $d.TargetUserName; CallerComputer = $d.TargetDomainName }
}2. Compare the account on every DC#
badPwdCount and the last bad password time are kept separately on each DC and aren't replicated. Besides the PDC emulator, which also records forwarded attempts, the DCs showing recent bad attempts tell you which site the bad password came through:
Get-ADDomainController -Filter * | ForEach-Object {
$dc = $_.HostName
Get-ADUser alex -Server $dc -Properties LockedOut, badPwdCount, LastBadPasswordAttempt |
Select-Object @{n='DC'; e={$dc}}, LockedOut, badPwdCount, LastBadPasswordAttempt
}3. Go to the caller computer#
On the computer named in 4740, read the 4625 events for that account. Logon Type 4 or 5 points to a scheduled task or service, 3 to a network client (follow the Source Network Address), 10 to a Remote Desktop session. If the caller is a server that authenticates on behalf of users, such as a mail, web, AD FS or VPN server, the stale password lives on a device behind it, so check that server's own logs.
4. No caller name? Turn on Netlogon logging#
For NTLM attempts, 4776 on the DCs shows the Source Workstation; for Kerberos, 4771 with 0x18 shows the Client Address. When neither is enough, enable Netlogon debug logging on the DCs (or deploy the Computer Configuration › Administrative Templates › System › Net Logon › Specify log file debug output level policy), reproduce, and search the log for the user and 0xC000006A or 0xC0000234:
nltest /dbflag:0x2080ffff
:: reproduce, then read %windir%\debug\netlogon.log
nltest /dbflag:0x05. Fix the source, then unlock#
Update or remove the stale credential: a service or scheduled task, saved credentials in Credential Manager, a persistent mapped drive, a phone's mail profile, a script, or a disconnected Remote Desktop session. Only then unlock:
Search-ADAccount -LockedOut | Select-Object SamAccountName, LastLogonDate
Unlock-ADAccount -Identity alexUnlocking before the source is fixed just starts the next lockout. With pass-through authentication, cloud sign-ins count against the AD threshold too; AADSTS50053 and on-premises lockouts explains how the two policies interact.
How to verify a fix#
- No new 4740 for the account on the PDC emulator through at least one full cycle of whatever caused it: a daily task needs a day, not five minutes.
badPwdCountstays at 0 on every DC, and the 4625 or 4776 failures from the old source stop.- The user signs in, and 4624 (successful logon) appears where 4625 used to.
- Netlogon logging is back to
0x0on every DC where you enabled it.

