Active Directory

Active Directory Account Locked Out: Event 4740 Origin

Active Directory Account Locked Out: Event 4740 Origin

An Active Directory account that “locks itself” is one of the most frequent causes of service desk tickets. At the same time, it is an important indicator of potential attacks or misconfigurations. The account lockout mechanism is designed to defend the infrastructure from brute-force and password spraying attacks. However, if poorly configured or mismanaged, it can turn into an operational vulnerability exploitable for denial-of-service attacks.

Reference versions: Active Directory on Windows Server · Microsoft documentation consulted November 2026

Why an account locks itself

The most frequent question to administrators is why an account locks “by itself,” often even after the user has changed the password and is using the correct one. The answer, almost always, is that somewhere there is still a component using old or incorrect credentials that continues to generate failed attempts until it exceeds the lockout threshold. Microsoft systematically lists, for both on-premises environments and Microsoft Entra Domain Services, a series of common scenarios where accounts are locked without malicious intent: repeated manual errors, applications or services using old passwords, mobile devices or clients not joined to the domain, and delays in password synchronization in hybrid environments. Read also: Entra ID: Conditional Access Basic Policies

In the case of Microsoft Entra Domain Services, official documentation explains that accounts are locked when a failed attempt threshold defined by the default fine-grained password policy is reached: by default, 5 incorrect attempts within 2 minutes lead to a lockout, which is automatically removed after 30 minutes. Microsoft states that this behavior is designed to protect against automated brute-force attacks, but acknowledges that it can easily be triggered by legitimate scenarios, such as a user repeatedly entering the wrong password or an application/service attempting to use an invalid password. The company explicitly advises against increasing this threshold to reduce the number of lockouts, recommending instead that the underlying cause be identified and resolved.

In on-premises environments, Microsoft and the technical community describe similar scenarios. Official responses on Microsoft Q&A and troubleshooting documentation explain that, after a password change, it is common for users to forget to update stored credentials in various places, such as Credential Manager, applications and services that use the same account, email profiles on phones, or Wi-Fi clients that connect with domain credentials. Each of these components can, without the user realizing it, generate a series of failed authentication attempts that eventually exceed the threshold, leading to account lockout.

Event 4740 and where it is logged (PDC emulator)

The event 4740 “A user account was locked out” is the technical cornerstone around which any serious lockout troubleshooting strategy revolves. Knowing what it represents, on which systems it is logged, what fields it contains, and how to enable its auditing is essential for any Active Directory administrator. Microsoft provides a detailed description of the event in both official Windows 10/Windows Server documentation and various technical resources dedicated to auditing. Read also: logrotate: Configure Log Rotation on Linux

According to Microsoft documentation and specialized sources, event 4740 is generated every time a user account is locked due to repeated logon attempts with an incorrect password. The event belongs to the “Account Management – User Account Management” auditing category and is of type Success, as it signals the successful operation of locking the account. It is the modern equivalent of event 644 used in previous versions of Windows (pre-2008).

The event structure includes several key fields. Technical sources show a common schema, where the “Subject” section identifies the account that performed the lockout operation (typically the system, represented by an account like DC01$ and its SID), while the “Account That Was Locked Out” section indicates the actual locked user, with their SID and account name. There is also an “Additional Information – Caller Computer Name” field that reports the name of the computer from which the authentication attempt originated that led to the lockout threshold being reached.

Official Microsoft documentation lists the main event fields: SubjectSecurityID, SubjectUserName, SubjectDomainName, SubjectLogonId describe the security context that performed the action; TargetSecurityID, TargetUserName, TargetDomainName indicate the locked account; finally, CallerComputerName contains the name of the computer that originated the request. The event is generated for both domain accounts, on domain controllers, and local accounts, on member systems or workstations, when the audit policy is configured. For local accounts, the event appears in the local system’s Security log; for domain accounts, typically in the Security log of the DC that performed the lockout.

For event 4740 to be logged, the auditing subcategory “Audit User Account Management” must be appropriately configured. Microsoft documents that this subcategory, part of the “Advanced Audit Policy Configuration” settings, controls whether the system generates events when user account management operations occur, including creation, modification, deletion, enablement, disablement, lockout, and unlock. In the official table of events associated with this subcategory, 4740 is listed as “A user account was locked out,” while 4767 is used for “A user account was unlocked.”

To enable auditing, Microsoft documentation and third-party guides suggest a path via Group Policy: in a GPO applied to domain controllers, you must navigate to “Computer Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\System Audit Policies\Account Management” and configure “Audit User Account Management” to log at least Successes, and often Failures as well. Once this policy is activated, domain controllers will generate event 4740 every time a domain account is locked, thus allowing the administrator to correlate lockouts with underlying causes. Similarly, member systems and workstations will generate 4740 for local account lockouts if subject to the same policy.

The role of the PDC Emulator

The PDC Emulator role in an Active Directory domain performs key functions related to passwords, lockouts, and time consistency among domain controllers. While Microsoft does not explicitly state that only the PDC Emulator can lock an account, troubleshooting procedures and tools like LockoutStatus.exe leverage the PDC Emulator’s particular position as a reference point for determining the actual status of an account in the domain. When an account is locked on a domain controller (which may or may not be the PDC Emulator), the change to the lockout attributes is replicated to other DCs according to usual AD replication rules, with the result that, within a short interval, all DCs see the account as LockedOut.

To identify your domain’s PDC Emulator, you can use a PowerShell command.

Get-ADDomain | Select-Object PDCEmulator

This dynamic has a direct impact on troubleshooting activities. Once the account is locked everywhere, tracing back to which controller actually recorded the failed attempts that exceeded the threshold becomes less straightforward, especially in domains with many geographically distributed DCs. Technical documentation and responses from Microsoft support teams suggest a well-defined procedure: first, determine on which domain controller the account is actually locked (often, but not necessarily, the PDC) using tools like LockoutStatus.exe, then consult that DC’s Security log to search for event 4740 related to the account and analyze the “Caller Computer Name” field to identify the machine or device from which the incorrect attempts originate.

Finding the source computer with PowerShell

To diagnose a lockout, the first step is to locate event 4740 and, most importantly, the Caller Computer Name field. This field indicates the computer from which the failed authentication attempts were generated. With PowerShell, you can query the security logs of your Domain Controllers to find this information.

Here’s a command to search for event 4740 on a specific Domain Controller (replace DC01 with the name of your DC) and display the relevant information:

Get-WinEvent -ComputerName DC01 -FilterHashtable @{LogName='Security'; Id=4740} | Select-Object TimeCreated, MachineName, Message

A typical output:

TimeCreated           MachineName Message
----------           ----------- -------
11/22/2026 10:30:15    DC01        A user account was locked out. Subject: ... Account Name: jsmith ... Caller Computer Name: WORKSTATION03
11/22/2026 09:15:00    DC01        A user account was locked out. Subject: ... Account Name: jdoe ... Caller Computer Name: SMITHPHONE

If the Caller Computer Name is empty or indicates an intermediate server (e.g., a RADIUS or VPN server), you will need to extend your investigation to that server’s logs to trace back to the end device. This is a common case, for example, with corporate Wi-Fi access or VPN connections, where the authentication server forwards requests to the Domain Controller.

Typical causes: saved credentials, services, phones

Much more insidious than simple typing errors is the presence of stored credentials in services, scheduled tasks, applications, or scripts that continue to use an invalid password. Official responses and Microsoft documentation emphasize that, after changing the password for an account also used by services or applications, it is essential to update all instances where that credential has been configured; otherwise, that component will continue to attempt authentication with the old password and cause repeated lockouts.

Microsoft Q&A guidance for diagnosing event 4740 details typical points to check on Windows systems involved in the lockout:

  • Credential Manager of the user: contains stored passwords for websites, applications, and network resources.
  • Scheduled tasks: scripts or programs configured to run with the account in question.
  • Windows Services: services configured to run with that user (often, domain accounts).
  • Mapped network drives: with specific credentials, attempting to reconnect.
  • Persistent sessions: client applications (like Outlook or VPN clients) that store credentials.

Microsoft notes that, in an AD context, it is common to use domain accounts for both interactive logins and services, and that after a password change, it is sufficient to forget to update just one service for it to continue generating failed attempts in the background.

A very frequent source of “mysterious” lockouts are mobile devices and, more generally, non-domain-joined clients attempting to authenticate to domain resources (e.g., corporate Wi-Fi, VPN, internal web services) using domain credentials. Microsoft Q&A provides concrete examples: a user changes their domain password but has a personal device that periodically attempts to connect to corporate Wi-Fi with stored credentials; these failed attempts, invisible to the user, are repeated until the lockout threshold is reached. Since the device does not belong to the domain, the “Caller Computer Name” field of event 4740 may be empty or uninformative, making it more difficult to identify the source. Read also: Network Microsegmentation: VLANs & Firewalls in Production

In hybrid environments combining on-premises Active Directory with Microsoft Entra ID and Microsoft Entra Domain Services, additional dynamics related to password synchronization come into play. Official Entra Domain Services documentation describes the scenario where a user changes their password in the on-premises environment, but this change takes a few minutes to synchronize through Microsoft Entra ID to the managed domain. If the user attempts to authenticate to managed domain resources before the new password has been fully replicated, the password will be rejected, and after a sufficient number of attempts, the account will be locked in the managed domain.

Unlocking the account

Once the cause has been identified and the root problem resolved (e.g., by updating the password in a service or on a mobile device), the account needs to be unlocked. If the lockout policy specifies a duration (Account lockout duration > 0), the account will automatically unlock after that period. However, to restore access immediately, an administrator can manually unlock it.

To unlock an Active Directory account, you can use a PowerShell cmdlet.

Unlock-ADAccount -Identity jsmith

Replace jsmith with the SamAccountName of the user to unlock. This command resets the lockout status and allows the user to attempt access again with the correct password. Remember that unlocking the account without resolving the underlying cause will lead to a new lockout shortly.

Listing locked accounts

To get an overview of currently locked accounts in your domain, you can use PowerShell tools and cmdlets.

Search-ADAccount -LockedOut | Select-Object Name, SamAccountName, LockedOut, LastBadPasswordAttempt

Setting a sensible lockout threshold

The three fundamental lockout policy settings are Account lockout threshold, Account lockout duration, and Reset account lockout counter after. The lockout threshold determines the number of failed logon attempts that lead to account lockout: it can range from 1 to 999 or be set to 0 to disable the attempt-based lockout mechanism. The lockout duration defines how many minutes the account will remain locked before automatically unlocking, unless an administrator intervenes manually; if the duration is set to 0, the account remains locked until administrative unlock. Finally, the reset timer establishes after how many minutes of absence of further failed attempts the error counter resets to zero; for consistency, if the threshold is greater than zero, the lockout duration must be at least equal to the reset timer value.

Get-ADDefaultDomainPasswordPolicy

A typical output:

ComplexityEnabled           : True
DistinguishedName           : CN=Default Domain Policy,CN=Policies,CN=System,DC=domain,DC=local
LockoutDuration             : -00:10:00
LockoutObservationWindow    : -00:10:00
LockoutThreshold            : 10
MaxPasswordAge              : 42.00:00:00
MinPasswordAge              : 1.00:00:00
MinPasswordLength           : 7
PasswordHistoryCount        : 24
PasswordReversibleEncryptionEnabled : False

LockoutThreshold is the number of failed attempts.

From a configuration perspective, Microsoft documentation clarifies that these settings are normally defined in the Default Domain Policy or a dedicated domain GPO for password and lockout policies. In environments using fine-grained password policies, it is possible to apply differentiated thresholds and durations to specific user groups or sensitive accounts, effectively overriding the behavior defined in the Default Domain Policy. This allows, for example, assigning stricter thresholds to privileged accounts while maintaining more tolerant settings for standard users, or vice versa, depending on the acceptable risk level. Microsoft configuration guides explicitly indicate the GPO path to follow in “Computer Configuration\Windows Settings\Security Settings\Account Policies\Account Lockout Policy” and remind that, when using granular password policies, settings in those policies must also be checked in addition to the domain GPO.

In modern environments, Microsoft has also introduced a specific lockout policy for the built-in local Administrator and administrative accounts, with the “Allow Administrator account lockout” option enabled by default in updated security configurations. The documentation summarizes that, in current default settings, the threshold is set to 10 incorrect attempts, the duration to 10 minutes, and the counter reset also to 10 minutes, with lockout applied even to administrative accounts. This represents a significant change from traditional configurations, where the Administrator account was often excluded from lockout for availability reasons; the modern trend instead prioritizes the protection of these accounts, which are among the primary targets of attackers. Read also: NIS2 Basic Security Measures: ACN Explained (2026)

In parallel, Center for Internet Security (CIS) benchmarks propose more restrictive settings for some scenarios. For Windows Server 2019, for example, the benchmark recommends that the “Account lockout threshold” setting be configured to “5 or fewer invalid logon attempts, but not 0,” emphasizing that a value of 0 is not compliant with the benchmark as it completely disables the lockout functionality. The document reminds that, once the threshold is configured, the lockout duration determined by the “Account lockout duration” setting affects how long the account will remain locked before an automatic unlock (unless this is set to 0, in which case administrative unlock is required). The difference between Microsoft’s recommendations (10 attempts) and CIS (5 or fewer) reflects a different balance between usability and security, which each organization must calibrate based on its risk appetite.

Common Errors and Troubleshooting

Diagnosing Active Directory account lockouts can be complex, especially in distributed or hybrid environments. Here is a summary table of common errors and their solutions:

Exact Error or Message Cause Solution
Account locked without apparent reason Credentials stored in Credential Manager, services, scheduled tasks, mobile devices. Identify the Caller Computer Name from event 4740, check Credential Manager, Windows services (services.msc), scheduled tasks (taskschd.msc), and the user’s mobile devices.
Caller Computer Name empty or RADIUS/VPN server Authentication via an intermediate server (e.g., RADIUS for Wi-Fi, VPN gateway). Analyze the intermediate server’s logs to trace back to the final device’s IP or MAC address.
Repeated lockouts after password change Old credentials still in use in some application or service. Educate the user to check all places where they stored the password. Use tools like ALockout.dll (with caution) to identify the process on the client.
Lockout in hybrid environment (on-prem AD + Entra ID) Delays in password synchronization between AD and Entra Domain Services. Inform users about synchronization times. Check synchronization logs and event 4740 in the managed domain.
Mass lockouts of many accounts Intentional Denial of Service attack (password spraying). Monitor event 4740 for anomalous patterns. Configure short lockout durations and immediate alerts for privileged accounts. Implement MFA.

Frequently Asked Questions

What does event 4740 mean?

Event 4740 indicates that a user account has been locked in Active Directory due to repeated login attempts with an incorrect password. This is a security mechanism to prevent brute-force attacks. The event is generated on the Domain Controller that detected the lockout threshold being exceeded.

How do you enable auditing for account lockouts?

To enable auditing for event 4740, you need to configure the “Audit User Account Management” subcategory in the Advanced Audit Policy Configuration. This setting is found in a Group Policy applied to Domain Controllers, under “Computer Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\System Audit Policies\Account Management.” Make sure to enable auditing for Successes.

What is the difference between LockoutThreshold 0 and a value > 0?

A LockoutThreshold of 0 completely disables the account lockout mechanism based on failed attempts. This means an account will never be locked, but it exposes the domain to unlimited brute-force attacks. A value greater than 0 (e.g., 5 or 10) enables lockout after a certain number of attempts, balancing security and usability. Microsoft recommends a non-zero value.

Is the PDC Emulator the only Domain Controller that locks accounts?

No, it is not the only one. Any Domain Controller that receives failed authentication attempts and detects the lockout threshold being exceeded can generate event 4740 and lock the account. However, the PDC Emulator is often the reference point for account state consistency and is queried by many diagnostic tools, so its logs are often crucial.

How can I prevent lockouts from mobile devices?

To prevent lockouts from mobile devices, ensure users update credentials on all their devices (phones, tablets) every time they change their domain password. In environments with AD-based Wi-Fi/VPN authentication, consider implementing MFA or using client certificates to reduce reliance on passwords on personal devices.

Conclusions with Operational Takeaways

Understanding and managing locked Active Directory accounts is a fundamental skill for every sysadmin. Event 4740 is your most powerful ally: learn to read it and extract the Caller Computer Name to trace the problem’s origin. PowerShell offers the necessary tools to automate searching, unlocking, and monitoring locked accounts, transforming a tedious task into an efficient process. Remember that most “mysterious” lockouts are not malicious but stem from outdated credentials in services, mobile devices, or applications, especially after a password change.

Finally, configuring lockout policies requires a balance between security and usability. A LockoutThreshold that is too low can lead to denial-of-service attacks, while one that is too high leaves the door open to brute force. Follow Microsoft’s recommendations and CIS benchmarks, but always adapt them to your organization’s specific context and operational needs. Proactive monitoring of event 4740, especially for privileged accounts, will allow you to detect anomalies and intervene before a simple lockout escalates into a more serious security issue.

Updated: November 2026

Sources

Share this article:

Written by

Rosario Giordano

Rosario Giordano is a system administrator and IT consultant specializing in cybersecurity and cloud, with over 20 years of experience managing enterprise Linux infrastructures. His areas of expertise include SSH hardening, Kubernetes platforms, PostgreSQL databases, VMware/ Proxmox virtualization, and compliance with NIS2 and ISO 27001 security frameworks