/
/

How to Trace, Fix, and Prevent Active Directory Account Lockouts

by Angelo Salandanan, IT Technical Writer
How to Trace, Fix, and Prevent Active Directory Account Lockouts blog banner image

Instant Summary

This NinjaOne blog post offers a comprehensive basic CMD commands list and deep dive into Windows commands with over 70 essential cmd commands for both beginners and advanced users. It explains practical command prompt commands for file management, directory navigation, network troubleshooting, disk operations, and automation with real examples to improve productivity. Whether you’re learning foundational cmd commands or mastering advanced Windows CLI tools, this guide helps you use the Command Prompt more effectively.

Key Points

  • Identify the specific event IDs (e.g., 4740) and log locations that capture lockout activity.
  • Automate log collection and correlation to pinpoint the cause of repeated account lockouts.
  • Apply targeted remediation (e.g., policy tweaks, password resets, or account unlocks) and implement preventive controls against future lockouts.

IT professionals and cybersecurity specialists often encounter lockouts in their environments, which disrupt user productivity and critical IT workflows. With that in mind, this quick guide helps you troubleshoot account lockouts in Active Directory and impose preventive measures and other safeguards.

7-step process for resolving AD account lockouts

Before you begin, here are some Active Directory troubleshooting considerations:

  • Ability to unlock accounts and adjust Group Policy for auditing.
  • Access to the domain controller security logs and Netlogon logging.
  • Remote access to the suspected source device to inspect stored credentials and services.
  • Change the window and help desk steps for credential rotation and service restarts.

With these requirements satisfied, you can conduct a thorough investigation into the lockout using the following workflow.

1. Confirm and scope the lockout at the DC

Start by confirming the lockout on the primary domain controller.

Review the PDC emulator to check the definitive lockout log for the domain, including the original event context rather than copies.

From there, capture the user name, domain controller, caller computer, and failure codes. These fields identify the account that was locked, the DC that recorded it, the machine that attempted the logon, and the reason the attempt failed (e.g., bad password, expired ticket).

Then, record the logon type, timestamps, time ranges, and affected DCs to align data and spot patterns. For instance, knowing the period and which controllers show related events helps you focus on the relevant servers and avoid chasing unrelated data.

2. Correlate events to identify the source

Correlate the lockout event with failed logon entries by matching timestamps, caller computers, and authentication protocols, and enable Netlogon diagnostics if the source remains unclear. This allows you to pinpoint the exact device or service supplying the invalid credentials, thereby speeding up the resolution.

3. Hunt common endpoint and service culprits

First, examine the most common endpoints and services that may hold outdated credentials.

Check

What to look for

Why

Windows Credential ManagerSaved passwords for the locked‑out accountStale credentials can be reused automatically
Mapped drives and cached RDP profilesStored credentials or saved connectionsDevices may repeatedly try old passwords
Scheduled tasks, services, and IIS app poolsTasks or services running under the user’s accountThey authenticate continuously and can trigger lockouts
Mobile/MDM mail, Wi‑Fi, VPN profilesProfiles that store the user’s passwordMobile or VPN clients may retry

Resolving these items typically identifies the source of the lockout and enables timely remediation.

4. Fix the immediate cause and validate

Next up, address the credential issue that caused the lockout cycle. Here are some common concerns to look out for:

Credential issue

Recommended remedy

Saved password in Windows Credential ManagerDelete or update the stored credential
Cached RDP or mapped‑drive credentialsRemove the saved connection and re‑authenticate
Service or scheduled task running under the user accountChange the service account password and restart the service
Mobile, MDM, VPN, or Wi‑Fi profile storing the passwordRe‑enter the new password and clear old profiles
Stale gMSA or local service account secretRegenerate the secret and apply it to the service

In addition, verify that the problem is resolved. For example, unlock the user account in Active Directory, then monitor Security and Netlogon logs for at least one full lockout cycle to confirm that no further failures occur.

5. Harden the environment to prevent future lockouts

Following remediation, strengthen the environment to lower future lockout risk

First, adjust lockout thresholds and enforce regular password rotation for privileged accounts. Then, deploy gMSA for services, replace NTLM with Kerberos, and keep time synchronized across all domain members. These controls improve credential management and help prevent recurring incidents.

6. Clean up stale and privileged access

Remove unused administrator accounts and outdated device objects, then align provisioning and de‑provisioning processes with a single source of truth.

For calibration, conduct periodic reviews to ensure credential integrity remains strong and to identify and eliminate background failures that can cause lockouts.

7. Document evidence and add guardrails

After a fix, document the observed lockout timeline, event IDs, root cause, and changes made in a central knowledge base system. For long-term maintenance, create a run‑book entry that outlines the investigation and remediation steps.

Finally, configure custom alerts for repeated lockout patterns so that future incidents can be flagged early and addressed promptly.

Account lockout remediation strategies with NinjaOne

NinjaOne offers several tools to support Active Directory user management, including scripts for monitoring login attempts, tracking inactive accounts, and determining last login times. The “Failed Password Attempt Report” is particularly helpful in identifying potential causes of account lockouts, especially since it can be configured to return results for a single or multiple users.

Related topics:

FAQs

The event ID for account lockouts in a Windows environment is 4740.

Query event ID 4740 in the Security log on the PDC emulator or run Get‑ADUser -Properties LockedOutTime.

Deploy a script that queries event ID 4740 across domain controllers, aggregates by user, and creates an alert when a threshold is exceeded.

Stale saved credentials, services, scheduled tasks, or mobile/MDM profiles repeatedly trying old passwords cause repeated lockouts.

Modify LockoutThreshold, LockoutDuration, and ResetCount in the Default Domain Policy to strike a balance between security and usability.

You might also like

Ready to simplify the hardest parts of IT?