Windows Event ID 4740: A user account was locked out
Security event 4740 is logged when an account is locked out after too many bad passwords. It names the account and the caller computer that triggered it.
Overview
- Event ID
- 4740
- Log / channel
- Security
- Provider
- Microsoft-Windows-Security-Auditing
- Category
- account
- Enabled by default
- Yes
- How to enable
- Advanced Audit Policy Configuration > Account Management > Audit User Account Management (Success). Enabled for Success in the default Windows audit policy.
What event 4740 logs
Event 4740 is written when the account lockout threshold is reached and an account is locked. Domain account lockouts are logged on domain controllers — the PDC emulator is the usual place to find them, since bad password attempts are forwarded to it — while local account lockouts are logged on the machine that owns the account.
The most useful detail is the Caller Computer Name, stored in the TargetDomainName field despite its name: it is the computer from which the failed logons came. It is a NetBIOS name, not an IP address, and it can be empty. The Subject* fields describe the system component that performed the lockout (typically the domain controller's computer account or SYSTEM), not a person.
Lockouts are usually the result of a stale password saved on a phone, mapped drive, service or scheduled task. They are also the visible side effect of password guessing: a single lockout is mostly noise, many lockouts across accounts from one caller is an attack.
Fields
Every field recorded in event 4740, with the values that matter for investigation.
TargetUserNameAccount that was locked out.
TargetSidSID of the locked account.
TargetDomainNameCaller Computer Name — the NetBIOS name of the computer that sent the failed authentication attempts. Start the investigation there.
SubjectUserNameAccount that performed the lockout, normally the domain controller's computer account (DC01$) or the local system.
SubjectUserSidSID of the subject, typically S-1-5-18 (SYSTEM).
How to enable this event
Advanced Audit Policy Configuration > Account Management > Audit User Account Management (Success). Enabled for Success in the default Windows audit policy.
Only generated when an account lockout threshold is configured in the password policy. Failed logons against an already locked account show up as 4625 with Status 0xC0000234.
Detection and investigation
Typically benign
- Users who changed their password but still have the old one saved on a phone, laptop, mapped drive or VPN client.
- Services, scheduled tasks or applications configured with an outdated password, locking the account repeatedly.
- Users mistyping their password several times.
Worth investigating
- Password guessing against a single account from one host.
- Password spraying that overshoots the lockout threshold, causing lockouts of many accounts from the same caller computer.
- Deliberately locking out administrators or service accounts as a denial of service.
Investigation notes
- Go to the caller computer and review its 4625 and 4648 events, services and scheduled tasks for the locked account.
- On domain controllers, correlate with 4771 (Kerberos) or 4776 (NTLM) failures for the account to see the source and failure codes.
- Count lockouts per caller computer and per time window to separate a misconfigured device from spraying.
- Check for 4767 (unlock) and 4724 (reset) afterward and for a successful logon by the same account.