Identify Source of Active Directory Account Lockouts: Troubleshooting

In this text, we’ll present you methods to monitor person account lockout occasions on Active Directory area controllers, decide from which pc and program the account is continually locked. In order to seek out an account lockout supply you should utilize the Windows safety log, PowerShell scripts, or the MSFT Account Lockout and Management Tool (Lockoutstatus.exe)

The referenced account is at the moment locked out and might not be logged on to

in most organizations requires necessary Active Directory person account lockout if the unhealthy password has been entered a number of occasions in a row. Usually, the account is locked by the area controller for a number of minutes (5-30), throughout which the person can’t log in to the AD area. After a while (set by area safety coverage), the person account is mechanically unlocked. Temporary AD account lockout reduces the danger of brute drive assaults to AD person accounts.

If the person account within the area is locked out, a warning seems when making an attempt to log in to Windows:

The referenced account is at the moment locked out and might not be logged on to ….

How to Check if a User Account is Locked?

You can confirm that the account is locked within the ADUC graphical console or utilizing the cmdlet from :

Get-ADUser -Identity jsmith -Properties LockedOut,ShowName | Select-Object samaccountName, showName,Lockedout

The account is now locked and can’t be used for authentication within the area (Lockedout = True).

You can listing all at the moment locked accounts in a site utilizing the :

Search-ADAccount -lockedout

You can unlock the account manually through the use of the ADUC console and with out ready until it’s unlocked mechanically. Find the person account, proper click on and choose Properties. Go to the Account tab and test the field Unlock account. This account is at the moment locked out on this Active Directory Domain Controller. Click OK.

You can even instantly unlock your account utilizing the next PowerShell command:

Get-ADUser -Identity jsmith | Unlock-ADAccount

You can test the account lockout time, the quantity of failed password makes an attempt, the time of the final profitable logon within the account properties within the ADUC console (on the tab) or utilizing PowerShell:

Get-ADUser jsmith -Properties Name, finalLogonTimestamp,lockoutTime,logonCount,pwdLastSet | Select-Object Name,@,@,@,logonCount

Account Lockout Policies in Active Directory area

The account lockout insurance policies are often set within the Default Domain Policy for the whole area utilizing the gpmc.msc snap-in. The vital insurance policies could be present in Computer Configuration -> Windows Settings -> Security Settings -> Account Policy -> Account Lockout Policy. These are the next insurance policies:

  • Account lockout threshold is the quantity of makes an attempt to enter the unhealthy password until the account is locked;
  • Account lockout length for a way lengthy the account will likely be locked (after this time the lock will likely be eliminated mechanically);
  • Reset account lockout counter after is the time to reset the counter of the failed authorization makes an attempt.
In order to guard your area person accounts from password brute-force assault, it is suggested to make use of robust person passwords in AD (use a password size of not less than eight characters and allow password complexity necessities). This is configured within the Password Policy part with the Password should meet complexity necessities and Minimum password size insurance policies. Periodically, it’s good to .

The instances when the person forgets the password and causes the account lockout themselves happen very often. If the person has lately modified the password and forgot it, you may it. But in some instances, the account lockout occurs with none apparent purpose. I.e. person declares that he by no means made a mistake when getting into a password, however his account for some purpose was locked. The administrator can unlock the account manually by the person request, however after some time the state of affairs might repeat.

In order to unravel the person’s drawback, the administrator wants to seek out which pc and program the person account in Active Directory was locked from.

Logon Audit Policies for Domain Controllers

To allow account lockout occasions within the area controller logs, it’s good to allow the next audit insurance policies in your area controllers. Go to the GPO part Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Advanced Audit Policy -> Logon/Logoff and allow the next insurance policies:

  • Audit Account Lockout
  • Audit Logon
  • Audit Logoff

The best method to allow this coverage is thru the gpmc.msc console by enhancing the Default Domain Controller Policy, or through the use of the Default Domain Policy on the whole area stage.

Account Lockout Event ID 4740

First of all, an administrator has to seek out out from which pc or server happen unhealthy password makes an attempt and goes additional account lockouts.

If the area controller closest to the person determines that the person is making an attempt to log in with invalid credentials, it redirects the authentication request to the DC with the PDC emulator (this specific DC is answerable for processing account locks). If authentication fails on the PDC, it responds to the primary DC that authentication will not be potential. If the quantity of unsuccessful authentications exceeds the worth set for the area within the Account lockout threshold coverage, the person account is briefly locked.

In this case, an occasion with EventID 4740 are recorded to the Security log of each area controllers. The occasion comprises the DNS identify (IP deal with) of the pc from which the preliminary request for authorization of the person got here. In order to not analyze the logs on all DCs, it’s best to search for the lockout occasions within the safety go browsing the PDC area controller. You can discover the PDC in your area as follows:


The area account lockout occasions could be discovered within the Security log  on the area controller (Event Viewer -> Windows Logs). Filter the safety log by the EventID 4740. You ought to see a listing of the latest account lockout occasions. From the topmost, scroll by means of all of the occasions and discover an occasion that signifies that the account of the person you might be on the lookout for (the username is listed within the Account Name worth and the occasion description “A person account was locked out”).

Note. In a big AD atmosphere, a big quantity of occasions are written to the safety go browsing the on area controllers, that are progressively overwritten by newer ones. Therefore, it’s advisable to extend the utmost log dimension on DCs and to begin the for the lockout supply as quickly as potential.

Open this occasion. The identify of the pc (server) from which a lockout has been carried out is specified within the subject Caller Computer Name. In this case the pc identify is TS01.

How to Find a Computer From Which an Account Was Locked with PowerShell?

You can use the next PowerShell script to seek out the supply of a particular person’s account lockout on the PDC occasion logs. This script returns the lock time and the identify of the pc from which it occurred:

$Usr = ‘username1’
$Pdc = (Get-AdvertDomain).PDCEmulator
$ParamsEvn = @
$Evnts = Get-WinEvent @ParamsEvn
$Evnts | foreach

Similarly, you may in Active Directory from PowerShell:
$Usr = ‘username1’
Get-ADDomainController -fi * | choose -exp hostname | % foreach

Microsoft Account Lockout and Management Tools

To discover the supply of person account lockout, you should utilize the half of Microsoft Account Lockout and Management Tools— the Lockoutstatus.exe instrument (you may obtain it right here). This graphical instrument checks the standing of account lockout and lockout occasions on all area controllers.

Run the Lockoutstatus.exe instrument, specify the identify of the locked account (Target User Name) and the area identify (Target Domain Name).

The listing that seems will comprise the listing of DCs and account standing (Locked or Non Locked). Additionally, the lock time and the pc from which this account is locked (Orig Lock) are displayed.

The badPwdCount and LastBadPasswordTry attributes should not replicated between area controllers.

You can unlock the person account, or change a password immediately from the Lockoutstatus window.

The primary downside of the LockoutStanding instrument is that it queries all area controllers for fairly a while (some of them might not be obtainable).

How to Trace What a Process is Locking Domain Account?

So, we’ve got discovered from which pc or server the account was locked out. Now it will be nice to know what program or course of are the supply of the account lockouts.

Often, customers begin complaining about locking their area accounts after altering their password. This means that the outdated (incorrect) password is saved in a sure program, script, or service that periodically tries to authenticate on a DC with a foul password. Consider the commonest places wherein the person might save the outdated password:

  • Mapped community drives (through internet use);
  • Windows Task Scheduler jobs;
  • Windows companies which are configured to run from a site account;
  • Saved credentials within the Credential Manager (within the Control Panel);
  • Browsers;
  • Mobile gadgets (for instance, these used to entry company mailbox);
  • Programs with autologin or ;
  • Disconnected/idle RDP classes on one other computer systems or RDS servers (subsequently, it’s advisable to set limits for RDP classes);

Tip. There are a quantity of third-party instruments (principally business) that permit an administrator to test a distant pc and establish the supply of the account lockout. As a reasonably standard resolution, observe the Lockout Examiner from Netwrix.

To carry out an in depth account lockout audit on the discovered pc, you should allow a quantity of native Windows audit insurance policies. To do it, open a neighborhood Group Policy Editor (gpedit.msc) on a pc (on which you wish to monitor the lockout supply) and allow the next insurance policies within the part Computer Configurations -> Windows Settings -> Security Settings -> Local Policies -> Audit Policy:

  • Audit course of monitoring: Success , Failure
  • Audit logon occasions: Success , Failure

Wait for the following account lockout and discover the occasions with the Event ID 4625 within the Security log. In our case, this occasion appears like this:

An account failed to go online.
Failure Reason: Account locked out.

As you may see from the occasion description, the supply of the account lockout is a mssdmn.exe course of (Sharepoint part). In this case, the person must replace password on the Sharepoint net portal.

After the evaluation is over and the lockout purpose is detected and eradicated, don’t neglect to disable native audit insurance policies.

If you continue to couldn’t discover the supply of account lockouts on a particular pc, simply attempt to rename the person account identify in Active Directory. This is often the best technique of safety in opposition to sudden locks of a selected person should you couldn’t set up the lockout supply.

Check Also

How to Enable and Configure MPIO on Windows Server 2016/2012R2?

In this text we’ll contemplate how to set up and configure MPIO on Windows Server …

Leave a Reply

Your email address will not be published. Required fields are marked *