****
*
*
*
*







*
*
                                      
*
*
Windows Server



    

Account Passwords and Policies    

*
*

*
*

Account Passwords and Policies



Apr
23

Account Passwords and Policies

 

Microsoft Windows NT Server 4.0, Windows 2000, Windows XP, and the Windows Server 2003 Family

 

Password and account lockout settings are designed to protect accounts and data in your organization by mitigating the threat of brute force guessing of account passwords. Settings in the Account Lockout and Password Policy nodes of the Default Domain policy settings enable account lockout and control how account lockout operates. This white paper describes how these settings affect account lockout and makes some general recommendations for configuring and troubleshooting account lockout issues.

 

Account Lockout and Password Concepts

Passwords are an important step in a security plan for your network. Users may see passwords as a nuisance; however, the security of your enterprise relies on a combination of password length, password uniqueness, and password lifespan. These three items help defend against dictionary attacks and brute force attacks. A dictionary attack occurs when a malicious user tries known words that are in the dictionary and a number of common password names to try and guess a password. A brute force attack occurs when a malicious user tries all of the possible permutations until one is successful.

Because most users prefer passwords that they can easily remember, dictionary attacks are often an effective method for a malicious user to find a password in significantly less time than they would with brute force attacks. Therefore, the strength of a password depends on how many characters are in the password, how well the password is protected from being revealed by the owner, how well the password is protected if it is intercepted by a malicious user on the network, and how difficult the password is to guess. Even good passwords that are protected by cryptography on the network and that are not subject to dictionary attacks can be discovered by brute force in a few weeks or months by a malicious user who intercepts the password on the network.

Currently, several attack methods are based on guessing weak passwords by using dictionary and brute force attacks. For a few simple ways to help prevent these attacks, see "Protecting from External Lockout Denial of Service Attacks" in this document for ports to block and registry values that you can set to help prevent such attacks.

Frequently, a malicious user will guess a number of passwords during a password-based attack. To help prevent the attacks from being successful, you can configure account lockout settings. The result of this configuration is that the associated account is temporarily disabled after a specified number of incorrect passwords are tried. This helps to prevent a successful attack by preventing the account from being used. However, a legitimate user cannot use that account until it is unlocked. This paper discusses the balance between the benefits and risks of account lockout.

Understanding Password Complexity

A complex password that is enforced by the operating system is one of the most effective methods that you can use to deter the opportunity for a successful attack. When you configure both an expiration time and a minimum length for a password, you decrease the time in which a successful attack could occur. For example, when you enforce password complexity with a password length of 6 and set the password to expire in 60 days, a user can choose from a permutation of:

26 lowercase characters

26 uppercase characters

32 special characters

10 numbers

This means that:

26 + 26 + 32 + 10 = 94 possible characters in a password

Password length policy = 6

946 = 689,869,781,056 unique password permutations

With a 60-day password expiration time, the malicious user would have to make 133,076 password attempts every second to attempt all of the possible passwords during that password's limited lifetime. If it takes only 50 percent of the permutations to guess the password, a malicious user would have to attempt to log on to the computer about 66,538 (133,076 * .50) times every second to discover the password before it expires.

To decrease the chances that a malicious user has to discover the password, you can use a password length of 7. When you set the minimum password length to 7, the possible password permutations exceed 64 trillion (947= 64,847,759,419,264). When you compare the calculations above that have a password length of 6 to the calculations below that have a password length of 7, you will notice that the malicious user would have to log on to the computer about 6,254,606 times for each second that the password is valid in the 60-day expiration time that you set.

The following list describes how increasing password length deters both dictionary and brute force attacks. Note that the examples that are in this list assume that you are have applied a policy that requires users to create complex passwords. When you do this, there are 94 possible characters from which the users can choose their password.

6 characters: 946 = 689,869,781,056

7 characters: 947 = 64,847,759,419,264

8 characters: 948 = 6,095,689,385,410,816

9 characters: 949 = 572,994,802,228,616,704

10 characters: 9410 = 53,861,511,409,489,970,176

Note: A few of these password possibilities are not valid. By default, users cannot choose any part of their user name for their password and they cannot use all of the same characters as a password. Because of this, these password possibilities must be deducted from the total number of possible passwords that are listed above. Because there are very few passwords that apply to these exceptions and because the number of passwords that do apply to these exceptions can vary (based on the number of letters that are in the user's logon name), this document does not account for these exceptions.

These statistics explain how difficult it is for a malicious user to discover a password when you require the users in your network to use a complex password. Because of this, Microsoft recommends that you enforce a complex password policy that requires users to choose passwords with a specific number of characters for the security needs of your organization. The "Password Policies Settings" section in this document describes the complex password policies and settings for Microsoft® Windows NT® Server 4.0, the Windows® 2000 family, and the Windows Server 2003 family of operating systems.

Microsoft recommends that you use the account lockout feature to help deter malicious users and some types of automated attacks from discovering user passwords. The following section provides more information about how you can use the account lockout feature.

Authentication

Authentication is the process of validating a user name and password on a domain controller for:

The initial logon to either a workstation or domain that uses the CTRL+ALT+DELETE secure logon sequence.

An attempt to unlock a locked workstation by using the CTRL+ALT+DELETE secure logon sequence.

An attempt to type a password for a password-protected screen saver.

A user, script, program, or service that attempts to connect to a network resource by using either a mapped drive or a Universal Naming Convention (UNC) path.

Note: An account that is locked out may still be able to gain access to some resources if the user has a valid Kerberos ticket to the resource. The ability to access the resource ends when the Kerberos ticket expires. However, neither a user who is locked out nor a computer account can renew the ticket. Kerberos cannot grant a new ticket to the resource because the account is locked out.

There are two primary authentication protocols used by Windows: NTLM and Kerberos. This paper assumes you are familiar with these authentication protocols and does not focus on authentication details. Instead, the focus is placed on how authentication plays a role in account lockout. For more information on authentication protocols, see online help in Windows XP and the Windows Server 2003 family.

How Domain Controllers Verify Passwords

To illustrate the authentication process, the following diagram describes the steps that occur when a logon attempt does not work.

clip_image001

Figure 1: Process for a Failed Logon Attempt
See full-sized image.

1.

The client computer presents the user logon information to a domain controller. This includes the users account name and a cryptographic hash of their password. This information can be sent to any domain controller and is typically sent to the domain controller that is identified as the closest domain controller to the client computer.

2.

When a domain controller detects that an authentication attempt did not work and a condition of STATUS_WRONG_PASSWORD, STATUS_PASSWORD_EXPIRED, STATUS_PASSWORD_MUST_CHANGE, or STATUS_ACCOUNT_LOCKED_OUT is returned, the domain controller forwards the authentication attempt to the primary domain controller (PDC) emulator operations master. Essentially, the domain controller queries the PDC to authoritatively determine if the password is current. The domain controller queries the PDC for this information because the domain controller may not have the most current password for the user but, by design, the PDC emulator operations master always has the most current password.

3.

The authentication request is retried by the PDC emulator operations master to verify that the password is correct. If the PDC emulator operations master rejects the bad password, the PDC emulator operations master increments the badPwdCount attribute for that user object. The PDC is the authority on the user's password validity.

4.

The failed logon result information is sent by the PDC emulator operations master to the authenticating domain controller.

5.

The authenticating domain controller also increments its copy of the badPwdCount attribute for the user object.

6.

The authenticating domain controller then sends a response to the client computer that notifies the domain controller that the logon attempt did not work.

As long as that user, program, or service continues to send incorrect credentials to the authenticating domain controller, logon attempts that failed because of an incorrect password continue to be forwarded to the PDC until the threshold value for incorrect logon attempts is reached (if you set it in a policy). When this occurs, the account is locked out.

For more information, see "How the Bad Password Count Is Incremented in Windows NT" in the Microsoft Knowledge Base.

New Features in the Windows Server 2003 Family

In the Windows Server 2003 family of operating systems, Microsoft has improved the function of the Account Lockout feature on both servers and client computers.

Computers Running Windows Server 2003 That Act As Network Servers

To improve the experience for users and to decrease the overall total cost of ownership, Microsoft made the following changes to the behavior of domain controllers in the Windows Server 2003 family:

Password history check (N-2): Before a Windows Server 2003 operating system increments badPwdCount, it checks the invalid password against the password history. If the password is the same as one of the last two entries that are in the password history, badPwdCount is not incremented for both NTLM and the Kerberos protocol. This change to domain controllers should reduce the number of lockouts that occur because of user error.

Single user object on demand replication: See the "Urgent Replication" section in this document for more information.

Optimized replication frequency: The default frequency for replication between sites is to replicate every 15 minutes with a 3-second offset to stagger the replication interval. This optimization improves the replication of a password change in a site because it decreases the chances that the domain controller would have to contact the PDC operations master.

Computers Running Windows Server 2003 Family Acting As Network Clients

Microsoft has added the following features in the Windows Server 2003 family to gather the process ID that is using the credentials that fail authentication:

Auditing logon changes: There are entries for all logon and logoff events (528 and 540, as well as 529 through 539).

Auditing of processes encountering authentication failures: New information is added to the Security event log when authentication failures occur:

Caller User Name

Caller Domain

Caller Logon ID

Caller Process ID

Note: To use the process ID, turn on success auditing for Audit process tracking events so that you can obtain the process identifier (PID) for the associated Event 592. If you do not do this, the PID is not useful after the process stops. To view audit process tracking, in the Group Policy Microsoft Management Console (MMC), in the console tree, double-click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Local Policies, and then double-click Audit Policy.

Microsoft has added the following administrative enhancements to provide more account lockout information than the information that is available in the default configuration of the Windows Server 2003 family:

AcctInfo.dll: The AcctInfo.dll file is a property page extension for user objects in the Active Directory Users and Computers MMC that provides detailed information about user password attributes. An administrator can use the AcctInfo.dll file to reset user account passwords on a domain controller that is in the user's Active Directory site.

LockoutStatus.exe: The LockoutStatus.exe tool displays bad password count and time information from all of the domain controllers that are in a domain. You can run this tool as either a stand-alone tool or as an extension to the AcctInfo.dll file when you place it in the Systemroot\System32 folder on your computer.

More information about both AcctInfo.dll and LockoutStatus.exe is available in "Account Lockout Tools" in this document.

 

Configuring Account Lockout Settings

To enable the Account Lockout policy settings for both domain and local users, configure the settings that are described in this section.

Recommended Service Packs and Hotfixes

Security issues in Windows operating systems are discovered and fixed often. These fixes often have an impact on account lockout and password policy features, as well as their dependent components. Therefore, you should apply the latest service packs and hotfixes to all of the domain controllers, servers, and clients to ensure that the account security settings that you want are applied and to ensure that the domain controllers and operating systems are up-to-date. Note that service packs resolve groups of issues and hotfixes resolve a specific issue.

You should have an ongoing strategy to keep your computers updated and protected against viruses, trojans, and so on, that may use vulnerabilities that are already fixed. For more information about how to create a software update strategy, refer to Help and Support Center in the Windows Server 2003 family and Windows XP, or refer to Help in Windows 2000.

Because these issues are discovered and fixed on an ongoing basis, they are not listed in this document. For more information, see "Service Packs and Hotfixes Available to Resolve Account Lockout Issues" in the Microsoft Knowledge Base.

 

Configuring Account Lockout

The account lockout policy settings are designed to help prevent a brute force attack on user passwords. This section describes where you can configure the setting, as well as some things that you should consider before you use the settings.

Configuring Account Lockout for Domain Users

For domain users, set the appropriate values by configuring the default domain policy in the console tree. To configure the default domain policy, open the Group Policy MMC, double-click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Account Policies, and then double-click Account Lockout Policy. For more detailed steps, see "Account Lockout Settings" in this document.

Configuring Account Lockout for Local Users

For a stand-alone workstation, set the appropriate registry values by configuring the local policy:

1.

Click Start, click Run, type gpedit.msc, and then press ENTER.

2.

In the Group Policy Object Editor MMC, double-click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Account Policies, and then double-click Account Lockout Policy.

3.

In the details pane, right-click the policy setting that you want, and then click Properties.

4.

If you are defining this policy setting for the first time, click Define this policy setting.

5.

Select the options that you want, and then click OK.

Microsoft recommends that you do not exempt the privileged accounts from password policies. Your privileged accounts should have complex passwords, an expiration period, and the passwords should be a minimum of fifteen characters in length. Microsoft also recommends that you also protect the local accounts (non-domain clients) by using a local password policy for all users. For all workstations in a domain, set a domain-level Group Policy object (GPO) and filter it to apply to the domain member computer.

Choosing Account Lockout Settings for Your Deployment

This section describes the ramifications of changing the various settings and a way to estimate the difficulty of using the brute force method of password guessing with a certain configuration. Like other settings that are associated with passwords, choosing settings for account lockout involves balancing the benefits and drawbacks between security, usability, and cost. The primary consideration is how much risk is acceptable when you configure the password policy of the domain. For example, consider the following two domain configurations:

User accounts that are in domain A have a minimum password length of 3 characters, no password complexity requirements, and passwords never expire.

User accounts that are in domain B have a minimum password length of 6 characters, password complexity, and passwords in the domain expire in 42 days.

There is less risk of a malicious user guessing the password of a domain B user; for the same risk tolerance, domain B can have a less stringent account lockout policy. Whether you set the LockoutDuration registry value to 0 or not also has an important on the setting that is permitted for both the ObservationWindow and LockoutThreshold registry values.

As an example, assume that the administrator resets the password when the account is locked with LockoutDurationregistry value of 0. With the LockoutDuration registry value set to 0 and the LockoutThreshold registry value set to 20, the malicious user has 20 guesses to use against that password. If the lockout duration is 30 minutes, the malicious user has 20 guesses every 30 minutes against that password until it is changed. This is a very significant difference in the total number of guesses that are available to the malicious user.

In comparison, if the administrator sets the maximum password age to 42 days, the first malicious user has only 20 guesses against any given password, while the second malicious user has 40,320 guesses (20 tries for ever lockout, multiplied by 48 lockouts every day, multiplied by 42 days before the user changes the password). With the default password settings, there are approximately 1012 possible passwords. This means that the malicious user has approximately a .000004 percent (%) chance of guessing the password. With an optimized guessing scheme, this percentage would most likely be a larger percentage.

This example demonstrates that setting the LockoutDuration registry value to 0 allows the LockoutThreshold registry value to be a significantly higher number for equivalent risk tolerance. If you increase the LockoutThreshold registry value, you help to reduce the behavior of a user accidentally locking themselves out of their computer.

When you choose the setting for account lockout, it is important that you consider the inherent denial of service that is associated with a locked out account. Ideally, the only accounts that are locked out are the accounts that are being attacked. However, the computer cannot determine the difference between a user typing an incorrect password or an automated task that is using an incorrect password. As a result, from the users perspective, users who are trying to perform their daily tasks may be suddenly unable to perform their work, which incurs both the cost of support to the domain and the cost of lost work. The lower the value that you set for the LockoutThreshold registry value, the more likely this behavior is to occur. The length of the ObservationWindow registry value has much less effect on this behavior than the LockoutThreshold registry value.

Microsoft recommends that you regularly review the Security event logs of all computers so that you are aware of any patterns that might show an attack or user error. The values that are necessary to identify specific malicious users and targets can be obtained only after you implement the auditing policies that are mentioned in the "Appendix Two: Gathering Information to Troubleshoot Account Lockout Issues" section in this document. Microsoft offers an event log monitoring solution, Microsoft Operations Manager (MOM), that you can script with responses. This tool also has many other built-in actions that you can use. For more information about MOM, see the MOM Web site.

Note: Web addresses can change, so you might be unable to connect to the Web site or sites mentioned here.

LockoutThreshold vs. ObservationWindow

In general, the LockoutThreshold value has more of an effect on how the computer behaves than the ObservationWindow value. Most logon attempts that do not work occur during a very short period of time. Because of this, the period of time is inside of the ObservationWindow time. Users rarely type a bad password many times in a row, so the LockoutThreshold value is rarely exceeded. The exception to this is the environment where the LockoutThreshold registry value is set so low that a user could accidentally mistype their password often enough to lock themselves out (for example, if you set the LockoutThreshold value to 2). Malicious password attacks are almost always automated. A user typically locks themselves out of their computer when they type a bad password once and try to type that same bad password over and over again.

Recommended Account Lockout Settings

The security configuration for an organization is determined by the level of protection that is required in the organization's environment. In some low-security scenarios (such as in a small office where no sensitive information is stored in the system), a simple password policy may be sufficient to protect the resources. However, in a high-security environment (such as in a banking system), much stronger security protection is desired. You should use account lockout and strong password policies in these environments. In all examples, the stronger the security that is implemented, the higher the cost that is associated with maintaining that security.

The following table provides recommended account lockout settings for many different security configurations.

Table 1 Recommended Account Lockout Settings

clip_image002

See full-sized image.

Note: "Cost" includes downtime cost for the user whose account is locked out, as well as support cost for servicing the locked out account.

Recommended Password Policy Settings

The table below provides recommended password policy settings for various security configurations.

Table 2 Recommended Password Policy Settings

clip_image003

See full-sized image.

General Recommendations for Account Lockout and Password Policy Settings

In addition to the specific account lockout and password policy settings in the previous tables, there are some other configuration changes that may help you achieve the level of security that you want. These include:

When you enable account lockout, set the ForceUnlockLogon registry value to 1. This setting requires that Windows re-authenticates the user with a domain controller when that user unlocks a computer. This helps to ensure that a user cannot use a previously-cached password to unlock their computer after the account is locked out.

False lockouts can occur if you set the LockoutThreshold registry value to a value that is lower than the default value of 10. This is because users and programs can retry bad passwords frequently enough to lock out the user account. This adds to administrative costs.

After you unlock an account that is locked out, verify that the LockoutDuration value is set. You should do this because the value may have changed during the account unlock process.

Carefully consider setting the LockoutDuration registry value to 0. When you apply this setting, you may incur additional administrative labor by requiring administrators to manually unlock a locked out user account. Although this does increase security, the increased labor drawback may outweigh the security benefit.

Define account lockout and password policies once in every domain. Ensure that these policies are defined only in the default domain policy. This helps to avoid conflicting and unexpected policy settings.

Unlock an account from a computer that is in the same Active Directory site as the account. By unlocking the account in the local site, urgent replication occurs in that site which triggers immediate replication of the change. Because of this, the user account should be able to regain access to resources faster than waiting for replication to occur. Note that the AcctInfo.dll tool helps to identify an appropriate domain controller and unlock the account. For more information about AcctInfo.dll, see the "Account Lockout Tools" section in this document.

Protecting from External Account Lockout Denial of Service Attacks

It is possible for a malicious user to launch a denial-of-service attack against your enterprise from outside of your network. Because most networks are interconnected, this can be a difficult attack to mitigate. The following techniques technologies are common techniques and technologies that you can use to help mitigate or prevent such attacks:

Require complex passwords: All accounts should have a complex password. All administrator accounts (local and domain) should have a long, complex password and you should change the password regularly.

Rename the administrator account: Because the administrator account cannot be locked out, it is recommended that you rename the account. Although this does not mitigate all of the attacks against the administrator account, it does help mitigate these attacks most of the time. For more information, see "HOW TO: Rename the Administrator and Guest Account in Windows 2000" on the Microsoft Knowledge Base.

Protect your environment with firewalls: To avoid an account lockout denial of service attack, block the TCP and UDP ports 135 through 139 and port 445 on your routers and firewalls. When you do this, you prevent logon attempts that occur outside of your network.

Prevent anonymous access: Set the RestrictAnonymous value to 2 on all computers that are exposed to the internet and to the entire domain if all of the computers are running versions of Windows 2000 or later. This stops malicious users from making anonymous connections to resources and may help defeat some types of attacks. Note that some operating systems have limited support for computers that have this setting. Some programs may also have issues with this setting if the programs use an anonymous connection to gain access to resources. For more information, see "How to Use the RestrictAnonymous Registry Value in Windows 2000" on the Microsoft Knowledge Base.

Protect site-to-site traffic by using a VPN tunnel: If communication between domain members in two sites is required, use a site-to-site VPN tunnel to securely connect site networks together. Do not open all NetBIOS ports on the firewall. You can use the Windows 2000 Server Routing and Remote Access service to create site-to-site VPN tunnels. If no VPN devices are available, you should configure the edge firewall or router filters to limit the traffic that is permitted to flow between the Internet Protocol (IP) address ranges that are used by each site. If sites need to use Active Directory replication only across the Internet, then use Internet Protocol security (IPSec) transport mode through the firewalls to secure all traffic between Active Directory servers. For more information about Active Directory replication through firewalls, see the "Active Directory Replication over Firewalls" white paper on the Microsoft Web site.

Protecting authentication and NetBIOS ports from Internet attack: On either the firewall or the router that connects your internal network to the Internet, block access to TCP and UDP ports 135 through 139 and port 445. If no edge filtering device is available, you can use IPSec filters to block these ports. To do this, use the configuration that is described in "How to Block Specific Network Protocols and Ports by Using IPSec" on the Microsoft Knowledge Base.

In the same IPSec policy, you must create an additional rule that adds filters to permit traffic to these ports when the source address is in a subnet that is used by the internal network. To do this, use the configuration that is described in "How to Block Specific Network Protocols and Ports by Using IPSec" on the Microsoft Knowledge Base.

Protecting authentication and NetBIOS ports from internal attack: If you must protect access to both authentication and NetBIOS ports from internal malicious users, you can restrict the computers that are permitted to gain access to these ports to only domain member computers by using the feature in IPSec that allows you to negotiate security. By allowing only trusted computers (domain member computers) to gain access to both authentication and NetBIOS ports, you reduce the number of computers that can perform the attack. This extra protection provides a defense against any breaches in your security perimeter and against malicious users who can connect to the internal network. For information about how to create a custom IPSec policy to use Kerberos authentication when negotiating IPSec security for access to TCP and UDP ports 135 through 139 and port 445 see the "Step-by-Step Guide to Internet Protocol Security (IPSec)" on the Microsoft Web site.

Update the server: Keep all of your servers up-to-date with current versions of antivirus software, firewall software, and Windows security patches. This helps prevent trojan horse programs and viruses from attacking your resources if the malicious user can launch an attack from your internal network instead of from the Internet. These updates are an important part of an in-depth and defensive security strategy.

 

Details of Account Lockout Settings and Processes

With the account lockout feature enabled, access to the account is denied when the number of logon attempts that did not work exceeds the LockoutThreshold registry value (the account lockout threshold) in a specified amount of time. A locked-out account cannot be used until it is reset by an administrator or until the lockout duration for that account expires.

Account Lockout is disabled on default installations of Windows NT Server 4.0, Windows 2000, and Windows Server 2003 domains. Account lockout operation is enabled after the domain administrator enables settings in the default domain policy. The policy settings remain enabled when you upgrade domain controllers to a later version of an operating system.

Although the Group Policy Object Editor appears to support account lockout and password policy in each organizational unit, these settings actually occur across the domain; you must define the settings on the root organizational unit for the domain. Microsoft recommends that you define account lockout and password policies in only one Group Policy object (GPO) for every domain (in the Default Domain policy settings).

Password Policy Settings

The first step that you should use to secure your network is to enforce password policy settings. When you implement a secure password policy, you may not need to implement the account lockout feature.

Password Complexity

Passwords, by default, can include any combination of characters; passwords can also be blank. Microsoft recommends that you require the use of complex passwords to help ensure that passwords provide the best security possible. These complex passwords are much more resistant to attack than blank or simple passwords.

To enforce password complexity in your organization, you can enable the Password must meet complexity requirements security setting. The complexity requirements enforced by this setting are stored in Passfilt.dll. In Windows 2000 operating systems and later, Passfilt.dll is built into the operating system. In Windows NT Server 4.0, you must add the Passfilt.dll file to the operating system to achieve the same results. Passfilt.dll is included in Windows NT Server 4.0 Service Pack 2 and in later service packs.

By default, complex passwords enforced by Passfilt.dll have the following properties:

Do not contain all or part of the user's account name.

Contain characters from three of the following four categories:

English uppercase characters (A through Z).

English lowercase characters (a through z).

Base-10 digits (0 through 9).

Non-alphanumeric (for example, !, $, #, %). extended ASCII, symbolic, or linguistic characters.

Note: Depending on your environment, using extended ASCII, symbolic, or linguistic characters in passwords can have unexpected results. It is highly recommended that you test these characters before using them in production.

When implementing this policy, it is recommended to inform your users of the change in policy so that a smooth transition can take place from a simple password to a complex password. Otherwise, users may be confused by the new password criteria and circumvent security to avoid the difficulty.

You can create and register your own custom password filter if you want to modify the complexity requirements enforced in the security setting. For information about how to create a Passfilt.dll file, see "Password Filters" on the MSDN Web site.

Password History

You can use the Password History setting to prevent users from repeatedly using the same password. When you use the password history feature, a user is prevented from using passwords that they used in the past, up to the number of passwords that you specify. You can configure Windows to retain between 0 and 24 passwords by using the Password History feature. Microsoft recommends that you set the password history to the maximum value to help ensure the least amount of password reuse by users.

In the Windows 2000 Server family and later, the location of the password history is in the Default Domain policy settings at Computer Configuration\Windows Settings\Security Settings\Account Policies\Enforce Password History.

Valid non-zero values are between 1 and 24. The default value is 24 for domain controllers running a member of the Windows Server 2003 family, 3 for domain controllers running a member of the Windows 2000 family, and 0 for all other Windows operating systems.

Minimum Password Length

You can use the Minimum Password Length setting to decrease the chances that a password can be discovered by a malicious user. For more information about the Minimum Password Length setting, see "Understanding Password Complexity" in this document.

In versions of Windows 2000 operating systems and later, you can change the Minimum Password Length setting in the Group Policy MMC, in the Default Domain policy settings at Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy\Minimum Password Length.

An administrator can set the value between 0 and 14 characters. Each additional character increases the total possible password permutations. However, if you set the value to 0, blank passwords are not permitted.

Valid non-zero values are between 1 and 14, with a default value of zero.

Maximum Password Age

You can use the Maximum Password Age setting to limit the time for which a given password is valid. This decreases the odds of being able to crack a password. For more information, see the example in the Passwords section in this document.

In the Windows 2000 family and later, the Maximum Password Age setting is located in the Group Policy MMC, in the Default Domain policy at Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy\Maximum Password Age.

This setting determines the period of time (in days) that a user can use their password before the computer requires the user to change it. You can set passwords to expire in between 1 and 999 days, or you can specify that passwords never expire by setting the number of days to 0.

Valid non-zero values are between 1 and 999, with a default value of 42.

Minimum Password Age

You can use the Minimum Password Age setting to preventing users from repeatedly changing passwords until the user is able to use their original password, if you enforce the Password History setting.

When you use the Minimum Password Age setting, you prevent the circumvention of password expiration and help to assure unique passwords.

The Minimum Password Age setting determines the period of time (in days) that a password must be used before the user can change it. You can set the value to between 1 and 999 days, or allow immediate changes by setting the number of days to 0.

Configure the Minimum Password Age setting to be a number that is larger than 0 if you want the Enforce Password History setting to be effective. If you do not set a minimum password age, users can repeatedly cycle through passwords until they are able to use an old favorite password. This could allow users to circumvent established password policy.

The Minimum Password Age setting is located in the Group Policy MMC, in Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy.

Valid non-zero values are between 1 and 999, with a default value of one for domain controllers and zero for other computers.

Account Lockout Settings

You can set the Account Lockout settings in the Active Directory Users and Computers MMC by using the procedure in this section.

Note: The value that you set for LockoutDuration cannot be a value that is less than OberservationWindow.

1.

Click Start, click Settings, click Control Panel, double-click Administrative Tools, and then double-click Active Directory Users and Computers.

2.

In the console tree, right-click the domain on which you want to set a Group Policy object.

3.

Click Properties, and then click the Group Policy tab.

4.

In Group Policy Object Links, click Default Domain Policy or create and name your Group Policy object, and then click Edit.

5.

In the console tree, double-click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Account Policies, and then click Account Lockout Policy.

6.

In the details pane, right-click the policy setting that you want, and then click Properties.

7.

If you are defining this policy setting for the first time, click Define this policy setting.

8.

Click the options that you want, and then click OK.

ObservationWindow

The ObservationWindow setting (also known in Group Policy as the Reset account lockout counter after setting) is the number of minutes after which an accounts badPwdCount registry value is reset. You can use the ObservationWindow setting to help mitigate lockout issues that are initiated by users. When you enable this setting, the bad password attempt is removed from the server after a period of time.

Valid non-zero values are between 1 and 99999, with a default value of 30.

LockoutDuration

The LockoutDuration setting (also known in Group Policy as the Account lockout duration setting) is the amount of time, in minutes, that account lockout is enforced on an account that has exceeded the LockoutDuration registry value, measured from the time of lockout. If you set the LockoutDuration registry value to 0, the account is permanently locked out until either an administrator or a user who has a delegated account resets the account. If the administrator or a delegated user account does not unlock the account, the operating system unlocks the account after the number of minutes that you set in the LockoutDuration registry value. Non-zero values for the LockoutDuration registry value reduce the administrative overhead of unlocking accounts by having them unlocked automatically; however, non-zero values do not provide the added security of user validation before the account is restored.

Valid non-zero values are between 1 and 99999, with a default value of 30.

LockoutThreshold

The LockoutThreshold setting (also known in Group Policy as the Account lockout threshold setting) is the number of times that the user, computer, service, or program can send a bad password during logon authentication before the account is locked out. Account lockout occurs when the badPwdCount registry value is equal to or exceeds the LockoutThreshold value. You can adjust the LockoutThreshold value to prevent both brute force and dictionary attacks, but you can set the value too low to capture user error and other non-attack errors. Administrators often set this value too low (3 through 5), which causes a large number of account lockouts because of user error, program caching by service accounts, or issues with networking clients. If you set the LockoutThreshold value to 0, no account lockouts occur on the domain.

Valid non-zero values are between 1 and 999, with a default value of zero.

Account Lockout Values

Account lockout registry values are described in this section. These values store the information that you need to track account lockout information.

Note: These values are maintained by the operating system, so you should not manually modify them.

badPasswordTime

The badPasswordTime value stores the last time that the user, computer, or service account submitted a password that did not match the password on the authenticating domain controller This property is stored locally on each domain controller that is in the domain. A value of 0 means that the last incorrect password time is unknown. For an accurate value for the user's last incorrect password time in the domain, you must query each domain controller that is in the domain; the largest one is the accurate value. For more information, see the "LockoutStatus.exe" section in this document.

Note: The badPasswordTime registry value is not replicated between domain controllers. This attribute, however, is reported to the PDC operations master.

badPwdCount

The badPwdCount value stores the number of times that the user, computer, or service account tried to log on to the account by using an incorrect password. This value is maintained separately on each domain controller in the domain, except for the PDC operations master of the accounts domain that maintains the total number of incorrect password attempts. A value of 0 indicates that the value is unknown. For an accurate total of the user's incorrect password attempts in the domain, you must query each domain controller and use the sum of the values. For more information, see the "LockoutStatus.exe" section in this document.

Note: The badPwdCount registry value is not replicated between domain controllers. This registry value, however, is reported to the PDC operations master.

ntPwdHistory

The ntPwdHistory registry value contains the password history for the user in Windows NT Server 4.0 one-way function (OWF). Both Windows 2000 and the Windows Server 2003 family use the Windows NT Server 4.0 OWF. This property is used by only the operating system. Note that you cannot obtain the password from the password in OWF form.

Other Settings that Affect Account Lockout

This section describes another setting that affect account lockout behavior. While the setting is focused on authentication, it is closely tied with account lockout policy.

You can set the authentication settings in the Active Directory Users and Computers MMC by using the procedure in this section.

1.

Click Start, click Settings, click Control Panel, double-click Administrative Tools, and then double-click Active Directory Users and Computers.

2.

In the console tree, right-click the domain on which you want to set a Group Policy object.

3.

Click Properties, and then click the Group Policy tab.

4.

In Group Policy Object Links, click Default Domain Policy or create and name your Group Policy object, and then click Edit.

5.

In the console tree, double-click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Local Policies, and then click Security Options.

6.

In the details pane, right-click the policy setting that you want, and then click Properties.

7.

If you are defining this policy setting for the first time, click Define this policy setting.

8.

Click the options that you want, and then click OK.

ForceUnlockLogon

The ForceUnlockLogon setting (also known as Interactive logon: Require Domain Controller authentication to unlock workstation controls the behavior of a computer running Windows 2000, Windows XP or the Windows Server 2003 family when the computer is unlocked by a user.

With a value of 1 (or Enabled, in Group Policy), unlocking the computer also performs a synchronous logon to the domain to verify user authenticity. This option is slower than allowing cached authentication because it requires network-based authentication.

With a value of 0 (or Disabled, in Group Policy), cached information is used to verify the users identity. When the verification is successful, the user is logged on. Windows then performs an asynchronous logon to the domain in the background. This means that the user can still unlock a computer when the account is unlocked.

Valid values are 0 and 1, with a default value of 0.

For additional information about unlocking a workstation, see the following articles:

"Information About Unlocking a Workstation" in the Microsoft Knowledge Base.

"Screensaver Password Works Even If Account Is Locked Out" in the Microsoft Knowledge Base.

Replication and Account Lockout

Account lockout relies on the replication of lockout information between domain controllers to ensure that all domain controllers are notified of an accounts status. In addition, password changes must be communicated to all domain controllers to ensure that a users new password is not considered incorrect. This data replication is accomplished by the various replication features of Active Directory and is also discussed in this section.

Immediate Replication

When you change a password, it is sent over Netlogon's secure channel to the PDC operations master. Specifically, the domain controller makes a remote procedure call (RPC) to the PDC operations master that includes the user name and new password information. The PDC operations master then locally stores this value.

Immediate replication between Windows 2000 domain controllers is caused by the following events:

Lockout of an account

Modification of a Local Security Authority (LSA) secret

State changes of the Relative ID (RID) Manager

Urgent Replication

Active Directory replication occurs between domain controllers when directory data is updated on one domain controller and that update is replicated to all other domain controllers. When a change in directory data occurs, the source domain controller sends out a notice that its directory store now contains updated data. The domain controller's replication partners then send a request to the source domain controller to receive those updates. Typically, the source domain controller sends out a change notification after a delay. This delay is governed by a notification delay. (The Windows 2000 default notification delay is 5 minutes; the Windows Server 2003 default notification delay is 15 minutes.) However, any delay in replication can result in a security risk for certain types of changes. Urgent replication ensures that critical directory changes are immediately replicated, including account lockouts, changes in the account lockout policy, changes in the domain password policy, and changes to the password on a domain controller account. With urgent replication, an update notification is sent out immediately, regardless of the notification delay. This design allows other domain controllers to immediately request and receive the critical updates. Note, however, that the only difference between urgent replication and typical replication is the lack of a delay before the transmission of the change notification. If this does not occur, urgent replication is identical to standard replication. When replication partners request and subsequently receive the urgent changes, they receive, in addition, all pending directory updates from the source domain controller, and not only the urgent updates.

When either an administrator or a delegated user unlocks an account, manually sets password expiration on a user account by clicking User Must Change Password At Next Logon, or resets the password on an account, the modified attributes are immediately replicated to the PDC emulator operations master, and then they are urgently replicated to other domain controllers that are in the same site as the PDC emulator. By default, urgent replication does not occur across site boundaries. Because of this, administrators should make manual password changes and account resets on a domain controller that is in that user's site.

The following events are not urgent replications in Windows 2000 domains:

Changing the account lockout policy

Changing the domain password policy

Changing the password on a computer account

Domain trust passwords

For additional information about urgent and immediate replication, see "Urgent Replication Triggers in Windows 2000" in the Microsoft Knowledge Base.

Single User Object On Demand Replication

In the Windows 2000 family, when an administrator resets and immediately expires a user's password on a domain controller in site A (so that the user is given a new password but forced to change it when the user first logs on), the logon may still succeed when the user logs on with that new password in site B. This occurs because the domain controller chains to the PDC operations master during authentication. However, the users password change may not replicate correctly because domain controllers in site B do not yet have the reset password. This occurs because there is replication latency between sites.

An update is available for Windows 2000 that changes this behavior. For more information to help change this behavior by implementing an "on-demand" replication scheme, see "You Cannot Change Your Password After an Administrator Resets It" on the Microsoft Knowledge Base. The updated replication scheme allows the domain controller to contact the PDC operations master to request an update of the user object that failed authentication because of an incorrect password. This helps to ensure that the authenticating domain controller receives the most current user account information as quickly as possible.

Mixed Environments with Windows NT Server 4.0 and Active Directory Domain Controllers

If servers that are running Windows NT Server 4.0 and earlier are in the domain, account lockout is not a dependable security feature.

For example, a Windows NT Server 4.0, Enterprise Edition, backup domain controller (BDC) may authenticate a user, even though the account is marked as locked out on a domain controller that is running Windows NT Server 4.0 and earlier. Also, Windows NT Server 4.0, Enterprise Edition, BDCs cannot unlock an account. The server that is running Windows NT Server 4.0, Enterprise Edition, can increment the bad password count when the user logs in with an incorrect password. That server can then report the increment to the other domain controller. However, the Windows NT Server 4.0, Enterprise Edition, BDC does not send this information to the domain controller that is running Windows NT Server 4.0 and earlier if the user logs on with the correct password. Because of this, the bad password count is not reset after the successful logon attempt.

The account lockout feature of Microsoft LAN Manager is not compatible with the account lockout feature on computers that are running Windows NT Server 4.0 and earlier. The domain controller that is running Windows NT Server 4.0 and earlier does not replicate any account lockout information to a LAN Manager BDC. If the account is marked as locked out on the Windows NT Server 4.0 and earlier domain controller, the LAN Manager BDC may still validate the user. The LAN Manager BDC displays the account lockout policy as set to "Never," even in a domain running Windows NT Server 4.0 and earlier where account lockout is enabled.

For these reasons, you should consider ensuring that all domain controllers in your network are running Windows 2000 or the Windows Server 2003 family. This is the only way to ensure that account lockout is enforced consistently across your network.

 

Maintaining and Monitoring Account Lockout

After you configure the account lockout options that you want, set up the computers so that you can capture more data about the accounts that are being locked out. This section describes how to enable auditing, Netlogon logging, and Kerberos logging, as well as which computers to retrieve the logs from. After you configure the logging and capture the appropriate data, this section will show you how to analyze the information so that you can ensure account lockout settings are working and identify attacks.

Enable Auditing at the Domain Level

The following sections describe how to enable auditing at the domain level for different operating systems.

To effectively troubleshoot account lockout, enable auditing at the domain level for the following events:

Account Logon Events – Failure

Account Management – Success

Logon Events – Failure

Windows 2000 and Windows Server 2003 Domains

The Audit Policy settings are located in the Default Domain policy settings. To view the Auditing policy settings, in the Group Policy MMC, double-click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Local Policies, and then double-click Audit Policy. Enable auditing for the event types listed in the previous section.

Windows NT Server 4.0 Domain

Open User Manager, click Policies, click Auditing, enable Logon and Logoff auditing for failure events, and then enable User and Group Management auditing for success events.

Settings for Event Logs

For troubleshooting purposes, change some of the settings for the Security event logs:

Set the maximum security log size to 10,000 KB or more. This helps to ensure that important events are not overwritten when the log file becomes large in size.

Set the event retention method to Overwrite events as needed to ensure that the computer is not shut down because there are too many Security event log entries, even when the log file becomes large in size.

For information about how to change the size and retention method of the Security event log, see the Help documentation for the operating system with which you are working.

Because the events can occur on both the client and the server, you can use the following tools to help you gather the information in a single location.

Use the EventCombMT.exe tool, a multithreaded tool, to gather specific events from event logs from several different computers to one central location and then search those event logs for specific data of interest. Some specific search categories are built into the tool, such as account lockouts, which is already configured to include events 529, 644, 675, 676, and 681. For more information, see the Help file that is included with the tool.

Use the Eventlog.pl tool to help you manage event logs in Windows 2000. You can use this tool to change the properties of event logs, back up event logs, export event lists to text file, clear event logs, and query the properties of the event logs. For more information, see "HOW TO: Use the Event Log Management Script Tool (Eventlog.pl) to Manage Event Logs in Windows 2000" in the Microsoft Knowledge Base.

Netlogon Logging

You can use Netlogon logging to capture Netlogon and NTLM events. It is recommended that you configure Netlogon logging in a Windows 2000 domain that has Windows 2000 clients.

You must configure Netlogon logging on the primary domain controller (PDC) and on any other domain controllers that are involved in user authentication. To determine the authenticating domain controller, at a command prompt, type set l or use the LockoutStatus.exe tool. For more information about the LockoutStatus.exe tool, see the "Account Lockout Tools" section in this document. For enterprises that have less than 10 domain controllers, you should enable Netlogon logging on all domain controllers for each domain.

Enabling Netlogon Logging on Computers Running Windows 2000 Server

To enable Netlogon logging on computers that are running Windows 2000 Server, at a command prompt, type nltest /dbflag:2080ffff. The log file is created in Systemroot\Debug\Netlogon.log. If the log file is not in that location, stop and restart the Netlogon service on that computer. To do this, at a command prompt, type net stop netlogon & net start netlogon. For more information, see "Enabling Debug Logging for the Netlogon Service" on the Microsoft Knowledge Base.

If free disk space is low, make sure there is enough space to allow the 40 megabytes (MB) maximum space for the logging. You should also consider the disk space that Netlogon logging uses. When Netlogon.log reaches 20 MB in size, it is renamed to Netlogon.bak and a new Netlogon.log is created with the latest Netlogon data. After that Netlogon.log reaches 20 MB in size, Netlogon.bak is truncated, and the current Netlogon.log file is renamed to Netlogon.bak. Because of this process, the total disk space that is used by Netlogon logging is never more than 40 MB.

Note: Performance may be slightly degraded by the logging process. Therefore, you should disable Netlogon logging after you have captured the events that you want in the log file. To disable Netlogon logging, at a command prompt, type nltest /dbflag:0, press ENTER, type net start netlogon and then press ENTER.

Kerberos Logging

If account lockouts involve Kerberos clients that are running a member of the Windows 2000 family or later, you can enable Kerberos logging on those client computers. You would typically perform this step after you have determined that there is an authentication issue that is related to Kerberos.

To enable Kerberos event logging on a computer:

1.

Click Start, click Run, type regedit, and then press ENTER.

2.

Add the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters registry value to the registry key:

Registry value: LogLevel

Value type: REG_DWORD

Value data: 0x1

If the Parameters registry key does not exist, create it.

3.

Close Registry Editor and restart the computer.

Caution Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer. Note: Performance may be degraded by the logging process. Therefore, you should disable the logging process after you capture the events that you want in the log file. To disable logging, remove the LogLevel registry value, and then restart the computer.

You can automate this process by using the script that is in the "Account Lockout Tools" section in this document. This script sets the Kerberos logging key in the registry on client computers that are running Windows 2000. If you want to enable logging for groups of computers, you can specify this script as a startup script in an Active Directory group policy.

To disable Kerberos event logging on a computer:

1.

Click Start, click Run, type regedit, and then press ENTER.

2.

Delete theHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters\LogLevelregistry value.

3.

Close Registry Editor and restart the computer.

Caution Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.

For more information, see the "HOW TO: Enable Kerberos Event Logging" in the Microsoft Knowledge Base.

Event and Netlogon Log Retrieval

After you set the auditing and logging, wait until account lockouts occur. When the account lockout occurs, retrieve both the Security event log and the System event log, as well as the Netlogon logs for all of the computers that are involved with the client's lockout. This includes the PDC emulator operations master, the authenticating domain controller, and all of the client computers that have user sessions for the locked-out user.

To determine the domain controllers that are involved with the lockout, run the LockoutStatus.exe tool and specify the user account that is locked out. This tool gathers and displays information about the specified user account from all the domain controllers in the domain. In addition, the tool displays the user's badPwdCount value on each domain controller. The domain controllers that have a badPwdCount value that reflects the bad password threshold setting for the domain are the domain controllers that are involved in the lockout. These domain controllers always include the PDC emulator operations master.

The badPwdCount value may appear to be higher than the threshold because of the way that passwords are chained to the PDC emulator operations master. When a bad password is presented by a user or program, both the authenticating domain controller and the PDC emulator operations master increment their badPwdCount value for that account. When Active Directory replication occurs, this can result in an increased value. However, the end result—the account becoming locked out—remains the same.

You can also use the EventCombMT.exe tool to gather specific event log data from multiple computers to one central location. For more information about both the EventCombMT.exe and LockoutStatus.exe tools, see the "Account Lockout Tools" section in this document.

Analyzing Log File Information

The previous section described the processes that you can use to enable log files to record information that is lockout-specific on your computers. This section focuses on analyzing those log files and determining what behavior occurred that created the log files and caused the issue that you are trying to resolve. This section also describes how to resolve the issues that you find when you analyze the log files.

Analyzing Netlogon Log Files

Before you start to analyze the Netlogon log files, you should be familiar with the authentication process works from previous sections in this paper. Although this section describes an NTLM authentication process, a similar chain of events occurs during Kerberos authentication.

The following sample scenario discusses what occurs when a user who is on a client computer tries to gain accesses to a resource that is on a file server in the same domain as the user account. In this process:

1.

User credentials are passed to the file server. This is displayed in the Network Logon section in the Netlogon.log file.

2.

The file server tries to authenticate the user, but the file server has to forward the credentials to the authenticating domain controller for validation because this account is a domain user account. This behavior is displayed as Transitive Network logon in the Netlogon.log file and is commonly referred to as pass-through authentication.

3.

If the password is incorrect or if it is not the same as the password that is stored by the authenticating domain controller, the authenticating domain controller chains the credentials to the PDC for validation. This is displayed as Transitive Network Logon in the Netlogon.log file.

Netlogon Log File Walkthrough

The following sections provide a sample Netlogon.log file output from the following three computers:

The PDC operations master for the domain: DC002

The authenticating domain controller: DC003

The member server: MEMSERVER01

The sample output sections show the following participants involved in network authentication:

Domain name: Tailspintoys

Logon user name: User1

Logon computer name: Computer-006

Transitive Network Logon (Pass-Through Authentication)

Sample from the DC002 PDC emulator Netlogon log file:

29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC000006A
29-Mar 14:28:31 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC0000234

Sample from the DC003 authentication domain controller Netlogon log file:

29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via MEMSERVER01) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via MEMSERVER01) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via MEMSERVER01) 0xC000006A
29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via MEMSERVER01) 0xC000006A
29-Mar 14:28:31 Transitive Network logon Tailspintoys\User1
Computer-006 (via MEMSERVER01) 0xC000006A
29-Mar 14:28:31 Transitive Network logon Tailspintoys\User1
Computer-006 (via MEMSERVER01) 0xC0000234

Sample from the MEMSERVER01 member server Netlogon log file:

29-Mar 14:28:31 Network logon Tailspintoys\User1
Computer-006 0xC000006A
29-Mar 14:28:31 Network logon Tailspintoys\User1
Computer-006 0xC000006A
29-Mar 14:28:32 Network logon Tailspintoys\User1
Computer-006 0xC000006A
29-Mar 14:28:32 Network logon Tailspintoys\User1
Computer-006 0xC000006A
29-Mar 14:28:32 Network logon Tailspintoys\User1
Computer-006 0xC000006A
29-Mar 14:28:32 Network logon Tailspintoys\User1
Computer-006 0xC0000234

These Netlogon.log file samples provide an example of the information contained in the Netlogon logs. This information is used to trace the account lockout from the domain controller back to the member server on which a user or application tried to gain access with the incorrect credentials.

Stepping Through the Netlogon Log File Sample

This section describes the standard analysis process of log files when attempting to determine the cause of an account lockout issue.

In most troubleshooting scenarios, you should begin your log file analysis by examining the Netlogon.log file on the PDC operations master. Because this is a transitive network logon, you can find the authenticating domain controller by viewing the "Via" line in the Netlogon.log file for the domain controller that is chaining logon to the PDC operations master.

Sample from the PDC Emulator (DC002) Netlogon Log File

On the "Via" line from the PDCs Netlogon.log file in the following example, note that the authentication is being chained from DC003.

29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer006 (via DC003) 0xC000006A

This is an illustration of step 3 of the authentication process that was detailed in "Analyzing Netlogon Log Files" previously in this document.

Sample from the Authentication Domain Controller (DC003) Netlogon Log File

In the Netlogon log file on DC003, this authentication is still a transitive network logon, because credentials were sent to DC003 for verification. Because of this, note where the credentials are sent from. In this example, the credentials are being sent via MEMSERVER01":

29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer006 (via MEMSERVER01) 0xC000006A

This is an illustration of step 2 of the authentication process that was detailed in "Analyzing Netlogon Log Files" previously in this document.

The file server tries to authenticate the user, but the file server has to forward the credentials to the authenticating domain controller for validation because this is a domain user account. This is displayed as Transitive Network logon in the FileServername section of the Netlogon.log file.

Sample from the Member Server (MEMSERVER01) Netlogon Log File

From the Netlogon.log file on MEMSERVER01 from the same time period, verify the actual client computer name where the original logon or session setup request came from. In this example, the request came from Computer-006:

29-Mar 14:28:31 Network logon   Tailspintoys\User1
Computer-006 0xC000006A

This is an illustration of step 1 of the authentication process that was detailed in "Analyzing Netlogon Log Files" previously in this document.

User credentials are passed to the file server. This is displayed in the Network Logon section in the Netlogon.log file.

Even though the log file does not display the exact process that is sending the incorrect credentials, Netlogon log files do provide the following information to help you troubleshoot the lockout:

Netlogon output displays the number of unsuccessful logon attempts (0xC000006A) for a user's account in a certain time period. Logs in which there are several 0xC000006A events in one second indicate that the lockout is most likely caused by a process, program, or script that is sending incorrect credentials.

Netlogon output provides a complete picture of all computers that are involved in the account lockout. You can narrow down the culprit by determining the common elements, such as programs, among the computers involved. For example, from the Netlogon output above, after you determined that MEMSERVER01 was common to all user lockouts, the troubleshooting focus changed to the particular network services or user accounts that are used by MEMSERVER01.

In this example, MEMSERVER01 is the Microsoft Exchange server. After you examine the Microsoft Outlook client and Exchange server settings, you may want to use the information that is in the following two articles to help resolve the issue. These articles describe how to remove unnecessary RPC bindings from the Exchange server. For example, remove Named Pipe support if there is no client that requires the named pipes.

"Outlook Locks Your Account Because of a Directory Service Referral with Exchange 2000 Server" in the Microsoft Knowledge Base.

"Unexpected Account Lockouts Caused When Logging On to Outlook from an Untrusted Domain" in the Microsoft Knowledge Base.

If the Netlogon logs from all domain controllers from the time of lockout but do not display data that pertains to any of the locked-out user accounts that you are analyzing, then NTLM authentication is not involved in the lockouts. This normally indicates that the authentication issues are between computers running Windows 2000 or later, because earlier versions of Windows used NTLM authentication exclusively. You should focus on Kerberos authentication troubleshooting by using Kerberos logging and examining the Security event logs.

Netlogon Log File Error Codes

Each event in the Netlogon log contains a corresponding error code. The following table describes these error codes.

Table 3 Netlogon Log Error Codes

Log Code

Description

0x0

Successful login

0xC0000064

The specified user does not exist

0xC000006A

The value provided as the current password is not correct

0xC000006C

Password policy not met

0xC000006D

The attempted logon is invalid due to a bad user name

0xC000006E

User account restriction has prevented successful login

0xC000006F

The user account has time restrictions and may not be logged onto at this time

0xC0000070

The user is restricted and may not log on from the source workstation

0xC0000071

The user account's password has expired

0xC0000072

The user account is currently disabled

0xC000009A

Insufficient system resources

0xC0000193

The user's account has expired

0xC0000224

User must change his password before he logs on the first time

0xC0000234

The user account has been automatically locked

Note: Many of these codes provide information in the log file that is redundant with the corresponding Netlogon event log. This allows you to analyze the events in a variety of ways.

Frequently Asked Questions

This section answers common questions that might be helpful in troubleshooting the Account Lockout feature in the Windows Server 2003 family.

Do the logon attempts happen seconds apart or are there many invalid logon attempt events (error code 0xC000006A) in the same second?

The pattern shows whether this is a user error or a process or program that is creating the lockout. Users take several seconds between events, however, a process or program typically register many invalid or unsuccessful logon attempt events in one second.

Note: You can use the NLParse.exe tool to parse Netlogon logs for specific events that are related to account lockout, such as events 0xC000006A and 0xC0000234. The parsed data is sent to a .csv file that you can read by using a program like Microsoft Excel. For more information about NLParse, see the "Account Lockout Tools" section in this document.

From which computers are the invalid logon attempt events generated?

When you review the Netlogon logs and event logs, you can isolate from which computer the user was logged on during the account lockouts. In many situations, you will discover that a user is logged onto multiple computers; after the user changes their password on one computer, the user account is locked out.

What client computers are displayed in the Netlogon log files?

If only Windows 98 or Windows 95 clients are locked out, you may need to install the directory service client for those clients. For example, below, the Computer-006 computer generates the invalid logon attempt event:

29-Mar 14:28:30 Transitive Network logon Acme\User1
Computer-006 (via DC003) 0xC000006A

Which user accounts are associated with the invalid logon attempt events?

If privileged accounts (such as the administrator, service accounts, and well-known application account names) are receiving a large number of incorrect password attempts, first review the information for the computers that have made the attempts with the incorrect passwords, and then determine if there is a wrong password for the account. After you do this, if the passwords on all of the accounts are reset and incorrect password attempts persist, perform a trace to determine if the computer is under an attack. You can place an event trigger to stop the trace and determine where the attempt may be coming from. Internal or external computers can be a threat if there are worm viruses or compromises. The following example shows that the 0xC000006A error code is generated from the Tailspintoys\User1 user:

29-Mar 14:28:30 Transitive Network logon Tailspintoys\User1
Computer-006 (via DC003) 0xC000006A

Is there an obvious pattern to the invalid logon attempt events and account lockouts?

Pattern: All users on the domain are locked out, including users who did not change their password. There are many unsuccessful authentication attempts per second.

Possible Solution: If you determine that the log files show that most or all of the user accounts are locked out in your domain, you must perform a trace to determine whether the source of the attack is internal or external to your network. If the attack appears to come from a internal computer, examine the processes running on these computers as this likely indicates a common process that uses outdated or incorrect credentials. Attacks from outside your network often indicate denial of service or brute force attacks against your user accounts.

Pattern: Alphabetical list of users in the log files.

Possible Solution: If the log files show that all of the user accounts are locked out in a list that is almost alphabetical, it is most likely that this behavior is caused by an attempt to break passwords or a denial of service attack. You must perform a network trace to the source of the attack.

Pattern: A specific number of logon attempts are made on each locked-out account.

Possible Solution: If you determine that the log files display a specific number of logon attempts for a each user, add the number of occurrences of 0xC000006A and 0xC0000234 errors for the user. In some scenarios, you may see a pattern of a specific number of attempts for one user, and then the same number of attempts for another user, and so on. This behavior may be an attack on the network or a program could be sending a specific set of attempts. 16 or 17 attempts per user is a common figure for these types of attacks.

In most account lockout situations, you must use Netlogon log files to determine which computers are sending bad credentials. When you analyze Netlogon log files, look for the 0xC000006A event code, because this event will help you determine where the bad password attempts began to occur. When you see the 0xC000006A event code and it is followed by a 0xC0000234 event code, the event codes that come after these event codes help you determine what caused the account lockout. If you see patterns in the log files, the patterns can help you determine if the event code was logged because of either a program attack or user error.

Analyzing Event Logs

You cannot determine the authentication type that was used when an account is locked out unless you enable Netlogon logging before the account lockout. However, because of differences in authentication, there may be situations in which Netlogon logging does not capture the data that you need to determine which computers were involved in an account lockout. Configuring the appropriate computers to create event logs may provide additional information in these situations.

Before the problems occur, you should enable security auditing and Kerberos logging on all computers that might be involved in the account lockout event. Enabling auditing and Netlogon log files is discussed elsewhere in this document. If the auditing is not configured before the initial error occurs, it can be done afterwards.

Once the account lockout occurs, there are several tasks that should be completed to help identify the cause of the issue:

1.

Obtain both the Security and System event logs from all of the computers that are locked out if those computers were logged on when the lockout occurred. Also, obtain these log files from the PDC emulator operations master and all domain controllers that may be involved in the account lockout.

2.

Look for Event 675 (Preauthentication Failures) in the Security event log for the domain controllers for the locked-out user account. This event displays the IP address of the client computer from which the incorrect credentials were sent. When you view these events in the Security event log from the PDC, an IP address with Event 675 may be the IP address of another domain controller because of password chaining from other domain controllers. If this is true, obtain the Security event log from that domain controller to see the Event 675. The IP address that is listed in that Event 675 should be the IP address for the client computer that sent the invalid credential.

3.

After you know which client computer is sending the invalid credentials, determine the services, programs, and mapped network drives on that computer. If this information does not reveal the source of the account lockout, perform network traces from that client computer to isolate the exact source of the lockout.

Note: You can use the EventCombMT.exe tool to gather event log dates from different domain controllers at the same time. For more information about EventCombMT.exe, see the Account Lockout Tools section in this document.

For more information, see the following articles:

"Windows 2000 Security Event Descriptions (Part 1 of 2)" in the Microsoft Knowledge Base.

"Windows 2000 Security Event Descriptions (Part 2 of 2) in the Microsoft Knowledge Base.

Example Event Log Entry: Incorrect Password Processed by Kerberos

The following example displays a sample Event 675 in the Security event log from the PDC emulator operations master:

Event Type: Failure Audit
Event Source: Security
Event Category: Account Logon
Event ID: 675
Date: 12/5/2001
Time: 5:47:26 PM
User: NT AUTHORITY\SYSTEM
Computer: COMPUTER-006
Description:
Pre-authentication failed:
User Name: user1
User ID: %{S-1-5-21-4235101579-1759906425-16398432-1114}
Service Name: krbtgt/Tailspintoys.com
Pre-Authentication Type: 0x2
Failure Code: 0x18
Client Address: 172.16.1.85

In this example, failure code 0x18 is listed because an incorrect user name or password was used. The client address of 172.16.1.85 identifies the network client that caused this failure. The user name "user1" is also included in this event. The client address and user name should provide enough information for you to begin to address the issue, because you know which user is attempting to logon from which computer.

Example Event Log Entry: Account is Locked Out

The following example displays a sample of Event 644, which indicates that the account is locked out:

Event Type: Success Audit
Event Source: Security
Event Category: Account Management
Event ID: 644
Date: 12/5/2001
Time: 5:47:26 PM
User: Everyone
Computer: COMPUTER-006
Description:
User Account Locked Out:
Target Account Name: user1
Target Account ID:%{S-1-5-21-4235101579-1759906425-16398432-1114}
Caller Machine Name:COMPUTER-006
Caller User Name:USER1$
Caller Domain:TAILSPINTOYS
Caller Logon ID:(0x0,0x3E7)

For more information on account lockout events, see "Audit Account Lockout" on the Microsoft TechNet Web site.

Example Event Log Entry: Logon Failure

The following example displays a sample of Event 529, which results from an unsuccessful logon attempt due to an invalid user name or password. This event is often useful in identifying the source of the lockout:

Event Type: Failure Audit
Event Source: Security
Event Category: Logon/Logoff
Event ID: 529
Date: 12/21/2001
Time: 2:05:20 PM
User: NT AUTHORITY\SYSTEM
Computer: COMPUTER-006
Description:
Logon Failure:
   Reason: Unknown user name or bad password
   User Name: user1
   Domain: Tailspintoys
   Logon Type: 2
   Logon Process: User32
   Authentication Package:    Negotiate
   Workstation Name: COMPUTER-006

This event contains several useful elements. It identifies the name of the computer that is attempting authentication, as well as the user and domain name. It also displays the logon type, which is discussed later in this section.

When Event 529 is logged, you should look for patterns in the event. Determine if there are several 529 events logged and determine if they all occur in one second or if they occur at specific time intervals. If so, there is a process or service that is running on the computer that is sending incorrect credentials. Look at the Logon Process and Logon Type entries in the log to determine the type of process that is passing incorrect credentials and to determine how the process is logging on.

Example Event Log Entry: Account Is Disabled

When there is an attempt to logon using a disabled account, a specific event is created in the event log. This can help you quickly identify intruders, because normal operations should not allow for the use of locked out accounts. You should analyze and respond quickly to these events.

Event Type:    Failure Audit
Event Source: Security
Event Category: Logon/Logoff
Event ID: 531
Date: 12/21/2001
Time: 2:05:21 PM
User: NT AUTHORITY\SYSTEM
Computer: COMPUTER-006
Description:
   Logon Failure:
   Reason: Account currently disabled
   User Name: user1
   Domain: TAILSPINTOYS
   Logon Type: 2
   Logon Process: User32
   Authentication Package: Negotiate

Kerberos Events Logged During an Account Lockout

Once Kerberos logging is enabled, certain events will be logged when an account lockout occurs. These events are described in this section.

Incorrect Password

This event is logged when an incorrect password is received by Kerberos as part of an authentication request.

Event Type:   Error
Event Source: Kerberos
Event Category: None
Event ID: 4
Date: 12/21/2001
Time: 2:02:05 PM
User: N/A
Computer: COMPUTER-006
Description:
   The function LogonUser received a Kerberos Error Message:
   on logon session TAILSPINTOYS\user1
   Client Time:
   Server Time: 19:2:5.0000 12/21/2001 (null)
   Error Code: 0x18 KDC_ERR_PREAUTH_FAILED
   Client Realm:
   Client Name:
   Server Realm: TAILSPINTOYS.COM
   Server Name: krbtgt/TAILSPINTOYS.COM
   Target Name: krbtgt/TAILSPINTOYS@TAILSPINTOYS
   Error Text:
   File:
   Line: Error Data is in record data.

Kerberos Event When a User Account Is Locked Out

This event is logged when Kerberos is used for authentication and an account lockout occurs.

Event Type: Error
Event Source: Kerberos
Event Category: None
Event ID: 4
Date: 12/21/2001
Time: 2:05:21 PM
User: N/A
Computer: COMPUTER-006
Description:
   The function LogonUser received a Kerberos Error Message:
   on logon session TAILSPINTOYS\user1
   Client Time:
   Server Time: 19:5:21.0000 12/21/2001 (null)
   Error Code: 0x12 KDC_ERR_CLIENT_REVOKED
   Client Realm:
   Client Name:
   Server Realm: TAILSPINTOYS.COM
   Server Name: krbtgt/TAILSPINTOYS.COM
   Target Name: krbtgt/TAILSPINTOYS@TAILSPINTOYS
   Error Text:
   File:
   Line: Error Data is in record data

Logon Events

Many different events can be created by various logon and logoff actions. The following table describes each logon event.

Table 4 Logon Event IDs

Event ID

Description

528

A user successfully logged on to a computer. For information about the type of logon, see the Logon Types table below.

529

Logon failure. A logon attempt was made with an unknown user name or a known user name with a bad password.

530

Logon failure. A logon attempt was made, but the user account tried to log on outside of the allowed time.

531

Logon failure. A logon attempt was made using a disabled account.

532

Logon failure. A logon attempt was made using an expired account.

533

Logon failure. A logon attempt was made by a user who is not allowed to log on at this computer.

534

Logon failure. The user attempted to log on with a type that is not allowed.

535

Logon failure. The password for the specified account has expired.

536

Logon failure. The Netlogon service is not active.

537

Logon failure. The logon attempt failed for other reasons.

Note: In some cases, the reason for the logon failure may not be known.

538

The logoff process was completed for a user.

539

Logon failure. The account was locked out at the time the logon attempt was made.

540

A user successfully logged on to a network.

541

Main mode Internet Key Exchange (IKE) authentication was completed between the local computer and the listed peer identity (establishing a security association), or quick mode has established a data channel.

542

A data channel was terminated.

543

Main mode was terminated.

Note: This might occur as a result of the time limit on the security association expiring, policy changes, or peer termination. (The default expiration time for security associations is eight hours.)

544

Main mode authentication failed because the peer did not provide a valid certificate or the signature was not validated.

545

Main mode authentication failed because of a Kerberos failure or a password that is not valid.

546

IKE security association establishment failed because the peer sent a proposal that is not valid. A packet was received that contained data that is not valid.

547

A failure occurred during an IKE handshake.

548

Logon failure. The security identifier (SID) from a trusted domain does not match the account domain SID of the client.

549

Logon failure. All SIDs that correspond to untrusted namespaces were filtered out during an authentication across forests.

550

A denial-of-service attack may have taken place.

551

A user initiated the logoff process.

552

A user successfully logged on to a computer using explicit credentials while already logged on as a different user.

672

An authentication service (AS) ticket was successfully issued and validated.

673

A ticket-granting service (TGS) ticket was granted.

674

A security principal renewed an AS ticket or TGS ticket.

675

Preauthentication failed. This event is generated on a Key Distribution Center (KDC) when a user types in an incorrect password.

676

Authentication ticket request failed. This event is not generated in Windows XP or in the Windows Server 2003 family.

677

A TGS ticket was not granted. This event is not generated in Windows XP or in the Windows Server 2003 family.

678

An account was successfully mapped to a domain account.

681

Logon failure. A domain account logon was attempted. This event is not generated in Windows XP or in the Windows Server 2003 family.

682

A user has reconnected to a disconnected terminal server session.

683

A user disconnected a terminal server session without logging off.

Note: This event is generated when a user is connected to a terminal server session over the network. It appears on the terminal server.

Netlogon Logon Types

When many Netlogon logon events are logged, a logon type is also listed in the event details. The following table describes each logon type.

Table 5 Netlogon Logon Types

Logon type

Logon title

Description

2

Interactive

A user logged on to this computer.

3

Network

A user or computer logged on to this computer from the network.

4

Batch

The batch logon type is used by batch servers, where processes may be executing on behalf of a user without their direct intervention.

5

Service

A service was started by the Service Control Manager.

7

Unlock

This workstation was unlocked.

8

NetworkCleartext

A user logged on to this computer from the network. The user's password was passed to the authentication package in its unhashed form. The built-in authentication packages all hash credentials before sending them across the network. The credentials do not traverse the network in plaintext (also called cleartext).

9

NewCredentials

A caller cloned its current token and specified new credentials for outbound connections. The new logon session has the same local identity, but uses different credentials for other network connections.

10

RemoteInteractive

A user logged on to this computer remotely using Terminal Services or Remote Desktop.

11

CachedInteractive

A user logged on to this computer with network credentials that were stored locally on the computer. The domain controller was not contacted to verify the credentials.

 

Troubleshooting Account Lockout

In an environment where you set the account lockout feature, you may notice a large number of lockouts that occur. To determine if these lockouts are false lockouts or a real attack:

1.

Verify that the domain controllers and client computers are up-to-date with service packs and hotfixes. For more information, see the "Recommended Service Packs and Hotfixes" section in this document.

2.

Configure your computers to capture data:

1.

Enable auditing at the domain level.

2.

Enable Netlogon logging.

3.

Enable Kerberos logging.

For more information, see the "Appendix Two: Gathering Information to Troubleshoot Account Lockout Issues" section in this document.

3.

Analyze data from the Security event log files and the Netlogon log files to help you determine where the lockouts are occurring and why.

4.

Analyze the event logs on the computer that is generating the account lockouts to determine the cause.

For more information, see the Account Lockout Tools section in this document.

The following section further describes the account lockout troubleshooting process.

Common Causes for Account Lockouts

This section describes some of the common causes for account lockouts The common troubleshooting steps and resolutions for account lockouts are also described in this section.

To avoid false lockouts, check each computer on which a lockout occurred for the following behaviors:

Programs: Many programs cache credentials or keep active threads that retain the credentials after a user changes their password.

Service accounts: Service account passwords are cached by the service control manager on member computers that use the account as well as domain controllers. If you reset the password for a service account and you do not reset the password in the service control manager, account lockouts for the service account occur. This is because the computers that use this account typically retry logon authentication by using the previous password. To determine whether this is occurring, look for a pattern in the Netlogon log files and in the event log files on member computers. You can then configure the security control manager to use the new password and avoid future account lockouts.

Bad Password Threshold is set too low: This is one of the most common misconfiguration issues. Many companies set the Bad Password Threshold registry value to a value lower than the default value of 10. If you set this value too low, false lockouts occur when programs automatically retry invalid passwords. Microsoft recommends that you leave this value at its default value of 10. For more information, see "Choosing Account Lockout Settings for Your Deployment" in this document.

User logging on to multiple computers: A user may log onto multiple computers at one time. Programs that are running on those computers may access network resources with the user credentials of that user who is currently logged on. If the user changes their password on one of the computers, programs that are running on the other computers may continue to use the original password. Because those programs authenticate when they request access to network resources, the old password continues to be used and the users account becomes locked out. To ensure that this behavior does not occur, users should log off of all computers, change the password from a single location, and then log off and back on.

Note: Commuters running Windows XP or a member of the Windows Server 2003 family automatically detect when the users password has changed and prompt the user to lock and unlock the computer to obtain the current password. No logon and logoff is required for users using these computers.

Stored user names and passwords retains redundant credentials: If any of the saved credentials are the same as the logon credential, you should delete those credentials. The credentials are redundant because Windows tries the logon credentials when explicit credentials are not found. To delete logon credentials, use the Stored User Names and Passwords tool. For more information on Stored User Names and Passwords, see online help in Windows XP and the Windows Server 2003 family.

Note: Computers that are running Windows 95, Windows 98, or Windows Millennium Edition do not have a Stored User Names and Passwords file. Instead, you should delete the users .pwl file. This file is named Username.pwl, where Username is the users logon name. The file is stored in the Systemroot folder.

Scheduled tasks: Scheduled processes may be configured to using credentials that have expired.

Persistent drive mappings: Persistent drives may have been established with credentials that subsequently expired. If the user types explicit credentials when they try to connect to a share, the credential is not persistent unless it is explicitly saved by Stored User Names and Passwords. Every time that the user logs off the network, logs on to the network, or restarts the computer, the authentication attempt fails when Windows attempts to restore the connection because there are no stored credentials. To avoid this behavior, configure net use so that is does not make persistent connections. To do this, at a command prompt, type net use /persistent:no. Alternately, to ensure current credentials are used for persistent drives, disconnect and reconnect the persistent drive.

Active Directory replication: User properties must replicate between domain controllers to ensure that account lockout information is processed properly. You should verify that proper Active Directory replication is occurring.

Disconnected Terminal Server sessions: Disconnected Terminal Server sessions may be running a process that accesses network resources with outdated authentication information. A disconnected session can have the same effect as a user with multiple interactive logons and cause account lockout by using the outdated credentials. The only difference between a disconnected session and a user who is logged onto multiple computers is that the source of the lockout comes from a single computer that is running Terminal Services.

Service accounts: By default, most computer services are configured to start in the security context of the Local System account. However, you can manually configure a service to use a specific user account and password. If you configure a service to start with a specific user account and that accounts password is changed, the service logon property must be updated with the new password or that service may lock out the account.

Note: You can use the System Information tool to create a list of services and the accounts that were used to start them. To start the System Information tool, click Start, click Run, type winmsd, and then click OK.

Other Potential Issues

Some additional considerations regarding account lockout are described in the following sections.

Account Lockout for Remote Connections

The account lockout feature that is discussed in this paper is independent of the account lockout feature for remote connections, such as in the Routing and Remote Access service and Microsoft Internet Information Services (IIS). These services and programs may provide their own unrelated account lockout features.

Internet Information Services

By default, IIS uses a token-caching mechanism that locally caches user account authentication information. If lockouts are limited to users who try to gain access to Exchange mailboxes through Outlook Web Access and IIS, you can resolve the lockout by resetting the IIS token cache. For more information, see "Mailbox Access via OWA Depends on IIS Token Cache" in the Microsoft Knowledge Base.

MSN Messenger and Microsoft Outlook

If a user changes their domain password through Microsoft Outlook and the computer is running MSN Messenger, the client may become locked out. To resolve this behavior, see "MSN Messenger May Cause Domain Account Lockout After a Password" in the Microsoft Knowledge Base.

 

Account Lockout Tools

After you determine the pattern for the account lockouts and narrow down your scope to a specific client computer or member server, you should gather detailed information about all of the programs and services that are running on that computer. Some of the information that you should obtain includes:

Mapped network drives

Logon scripts that map network drives

RunAs shortcuts

Accounts that are used for service account logons

Processes on the client computers

Programs that may pass user credentials to a centralized network program or middle-tier application layer

The following sections discuss the tools that you can use to help you gather information from the network environment.

The LockoutStatus.exe Tool

The LockoutStatus.exe displays information about a locked out account. It does this by gathering account lockout-specific information from Active Directory. The following list describes the different information that is displayed by the tool:

DC Name: Displays all domain controllers that are in the domain.

Site: Displays the sites in which the domain controllers reside.

UserState: Displays the status of the user and whether that user is locked out of their account.

Bad Pwd Count: Displays the number of bad logon attempts on each domain controller. This value confirms the .domain controllers that were involved in the account lockout.

Last Bad Pwd: Displays the time of the last logon attempt that used a bad password.

Pwd Last Set: Displays the value of the last good password or when the computer was last unlocked.

Lockout Time: Displays the time when the account was locked out.

Orig Lock: Displays the domain controller that locked the account (the domain controller that made the originating write to the LockoutTime attribute for that user).

Where to Obtain the LockoutStatus.exe Tool

LockoutStatus.exe is included with the ALTools.exe package that is available at "Account Lockout and Management Tools" on the Microsoft Web site.

How to Install the LockoutStatus.exe Tool

To install the LockoutStatus.exe tool, install the ALTools package on your domain controller..

How to Use the LockoutStatus.exe Tool

To run the LockoutStatus.exe tool and display information about a locked out user account:

1.

Double-click LockoutStatus.exe.

2.

On the File menu, click Select target.

3.

Type the user name whose lockout status on the enterprise's domain controllers you want information about.

The following figure displays an example where two domain controllers have a badPwdCount value of 5, which is also the bad password threshold. One domain controller is the PDC operations master, and the other domain controller is the authenticating domain controller. These two domain controllers are displayed because of password chaining from the authenticating domain controller to the PDC.

clip_image004

Figure 2: The LockoutStatus.exe Tool
See full-sized image.

The ALockout.dll Tool

The ALockout.dll tool and the Appinit.reg script are included in the ALTools package. ALockout.dll is a logging tool that may help you determine the program or process that is sending the incorrect credentials in an account lockout scenario. The tool attaches itself to a variety of function calls that a process might use for authentication. The tool then saves information about the program or process that is making those calls into the Systemroot\Debug\Alockout.txt file. The events are time stamped so that you can match them to the events that are logged in either the Netlogon log files or the Security event log files.

You can use Appinit.reg to initialize the .dll file. This file provides no other functionality.

Note: Microsoft does not recommend that you use this tool on servers that host network programs or services. You should not enable ALockout.dll on Exchange servers because the ALockout.dll tool may prevent the Exchange store from starting. Important: Before you install the ALockout.dll tool on any mission-critical computer, make a full backup copy of the operating system and any valuable data.

For more information, see "Errors Installing Exchange Server with CleanSweep" on the Microsoft Knowledge Base.

In most account lockout scenarios, you should install ALockout.dll on client computers. Use the information that is stored in both the Netlogon log file and the Security event log to determine the computers from which the incorrect credentials are being sent that are locking out the user's account. When you install the ALockout.dll tool on the client computer that is sending the incorrect credentials, the tool logs the process that is sending the incorrect credentials.

Where to Obtain the ALockout.dll Tool

ALockout.dll is included with the ALTools.exe package that is available at "Account Lockout and Management Tools" on the Microsoft Web site.

How to Install the ALockout.dll Tool

There two versions of the ALockout.dll file. One version of the file is for computers that are running a Windows 2000 operating system, and the other version of the file is for computers that are running a Windows XP operating system. View the Readme.txt file that is included with the ALTools package.

To install ALockout.dll:

1.

On the computer that has generated account lockout error messages in the Security event log, copy both the ALockout.dll and Appinit.reg files to the Systemroot\System32 folder.

2.

Double-click the Appinit.reg file to run the script. When you do this, the ALockout.dll file is registered and can begin providing information.

3.

Restart the computer to complete the installation.

How to Remove the ALockout Tool

To remove the ALockout.dll file from the computer:

1.

Delete the ALockout.dll file from the Systemroot/System32 folder.

2.

At a command prompt, type regsvr32 /u alockout.dll.

3.

Delete the Alockout.dll value that is under the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows

AppInit_DLLs

After you delete the Alockout.dll value, the AppInit_DLLs registry key is blank.

Restart the computer.

How to Use the ALockout.dll Tool

You should use the ALockout.dll tool with Netlogon logging and security auditing. To use the ALockout.dll tool:

1.

Wait for an account to lock out on the computer.

2.

When an account is locked out, the ALockout.txt file is created in the Systemroot\Debug folder.

3.

Compare event time stamps in ALockout.txt with the time stamps in both the Netlogon log files and the Security event log files. When you do this, you can determine the process that is causing the lockouts.

You can use the ALockout.dll tool if you have already set up Netlogon logging, as well as Kerberos and logon auditing on the local computer. ALockout.dll does not interfere with any other logging or event generation.

The ALoInfo.exe Tool

If account lockouts seem to happen most frequently after a user is forced to change their password, you may want to determine which users' passwords are about to expire. You can use the ALoInfo.exe tool to display all user account names and the password age for those user accounts. This will allow you to use the ALockout.dll tool and other account lockout tools to set up the tools prior to the initial account lockout. You can also obtain a list of all local services and startup account information by using the ALoInfo.exe tool.

Note: You can also use the SecDump tool to display password expiration information in a Windows NT Server 4.0 domain. You can download this tool from the SystemTools Web site. Note that Web addresses can change, so you might be unable to connect to the Web site or sites mentioned here.

Where to Obtain the ALoInfo.exe Tool

The ALoInfo.exe file is included with the ALTools.exe package that is available at "Account Lockout and Management Tools" on the Microsoft Web site.

How to Install the ALoInfo.exe Tool

To install the ALoInfo.exe tool, install the ALTools package on your domain controller. The ALTools package contains the ALoInfo.exe tool.

How to Use the ALoInfo.exe Tool

You can use ALoInfo.exe at a command prompt with either of the following methods:

To display an accounts password ages from a domain controller, at a command prompt, type the following:

aloinfo /expires /server:Domain_Controller_Name

To display all local service startup account information and mapped drive information for a user who is currently logged on, at a command prompt, type the following command:

aloinfo /stored /server:Computer_Name

You can redirect the output of ALoInfo.exe to a text file and then sort the results to determine which users may be involved in the account lockout. This information can also be stored for later analysis.

The AcctInfo.dll Tool

You can use the AcctInfo.dll tool to add new property pages to user objects in the Active Directory Users and Computers MMC Snap-in. You can use these property pages to help isolate and troubleshoot account lockouts and to reset a users password on a domain controller in that user's local site.

AcctInfo.dll displays the following user account information that you may be able to use to identify and resolve account lockout issues:

Last time the password was set

When the password will expire

User Account Control Raw Value and Decode

Time the account was locked out

If the account is locked out now, when it will be unlocked

Security identifier (SID) of the account, and its SIDHistory

Globally unique identifier (GUID) of the account

These account properties:

Last Logon

Last Logoff

Last Bad Logon Time

Logon Count

Bad Password Count

You can also use the AcctInfo.dll tool to obtain the domain password information (expiration, lockout time, and so on). You can type the user's computer name in the tool, and then reset the user's password on a domain controller in that user's site.

Note: Because of replication latency, domain controllers may store different information about the same user account. AcctInfo.dll displays information that is retrieved from a single domain controller.

Where to Obtain the AcctInfo.dll Tool

The AcctInfo.dll tool is included in the ALTools.exe package that is available at "Account Lockout and Management Tools" on the Microsoft Web site.

How to Install the AcctInfo.dll Tool

On the computer where you want to run Active Directory Users and Computers MMC Snap-in:

1.

Copy the AcctInfo.dll file to the System32 folder.

2.

At a command prompt, type regsvr32 acctinfo.dll, and then press ENTER.

The AcctInfo.dll file is registered and is displayed on a user's property sheet in the Active Directory Users and Computers MMC Snap-in after you follow these steps.

To use the Account Lockout Status button in the tool, verify that LockoutStatus.exe is in the Systemroot\System32 folder. If LockoutStatus.exe is not installed in this location, this button is unavailable.

How to Use the AcctInfo.dll Tool

To use the AcctInfo.dll tool, open the Active Directory Users and Computers MMC, right-click a user, click Properties, and then click Additional Account Info. An example of the information that is provided by AcctInfo.dll is shown in the following figure.

clip_image005

Figure 3: Main Property Box
See full-sized image.

The following figure displays the domain password policy information that you can view to determine the password policy that applies to the domain controller.

clip_image006

Figure 4: Domain Password Policy

Change Password on a Domain Controller in the User's Site

The AcctInfo.dll tool allows you to increase the functionality of the Active Directory Users and Computers MMC by adding the ability to reset a user's password in that user's local site. When you reset the password in the remote site, you avoid replication delays that can occur before that user logs on.

When you reset the password, you can also unlock the account and set the User must change password value. These options are in the Change Password On a DC In The Users Site box as displayed in the following figure.

clip_image007

Figure 5: Change Password On a DC In The Users Site
See full-sized image.

How to Remove the AcctInfo.dll Tool

To remove the AcctInfo.dll tool, delete the AcctInfo.dll file from the Systemroot/System32 folder, and then type the following command at a command prompt:

regsvr32 /u acctinfo.dll

The EventCombMT.exe Tool

You can use the EventCombMT.exe tool to gather specific events from event logs from several different computers into one central location. You can configure EventCombMT.exe to search for events and computers. Some specific search categories are built into the tool, such as account lockouts. Note that the account lockouts category is preconfigured to include events 529, 644, 675, 676, and 681.

clip_image008

Figure 6: The EventCombMT.exe Tool
See full-sized image.

Where to Obtain the EventCombMT.exe Tool

The EventCombMT.exe tool is included in the ALTools.exe package that is available at "Account Lockout and Management Tools" on the Microsoft Web site.

How to Install the EventCombMT.exe Tool

You do not need to install this tool separately. When you install ALTools on the domain controller, EventCombMT.exe is also installed to the directory you specified during setup.

How to Use the EventCombMT.exe Tool

To use the EventCombMT.exe tool, open the folder you specified during setup for ALTools, double-clickEventCombMT.exe, click the Searches menu, click Built in searches, and then click Account lockouts. When you do this, the events that will be pulled from the event logs are automatically displayed in the tool. These events are from all of the domain controllers in your environment. In addition to 529, 644, 675, and 681, type 12294 in the Event Ids box, and then click Search. The tool then searches the computers for these events, and then saves them to a .txt file that you specify.

The NLParse.exe Tool

Because Netlogon log files may become more than 10 MB in size, you may want to parse the files for the information that you want to view. You can use the NLParse.exe tool to parse Netlogon log files for specific Netlogon return status codes. The output from this tool is saved to a comma-separated values (.csv) file that you can open in Excel to sort further.

Note: The return codes that are specific to account lockouts are 0xC000006A and 0xC0000234.

The following figure displays the interface for the NLParse.exe tool.

clip_image009

Figure 7: Netlogon-Parse Return Status Codes
See full-sized image.

Where to Obtain the NLParse.exe Tool

The NLParse.exe tool is included in the ALTools.exe package that is available at "Account Lockout and Management Tools" on the Microsoft Web site.

How to Install the NLParse.exe Tool

You do not need to install this tool separately; when you install ALTools on the domain controller, NLParse.exe is also installed.

How to Use the NLParse.exe Tool

To use the NLParse.exe tool, open the folder you specified during setup for ALTools, double-click Nlparse.exe, click Opento open the Netlogon.log file that you want to parse, select the check boxes for the status codes that you want to search for, and then click Extract. After you do this, view the output from the NLParse.exe tool. Typically, you may want to look at both the 0xC000006A and 0xC0000234 code statuses to determine from where the lockouts are coming.

The FindStr.exe Tool

You can also use the FindStr.exe tool to parse Netlogon log files. FindStr.exe is a command-line tool that you can use to parse several Netlogon.log files at the same time. After you gather the Netlogon.log files from several domain controllers, extract information about a specific user account from the files (user1, error code 0xC000006A, or error code0xC0000234). You can use this tool to help you obtain output about a user, computer, or error code in the Netlogon.log files.

Where to Obtain the FindStr.exe Tool

The FindStr.exe tool is included in the default installation of Windows 2000, Windows XP, and the Windows Server 2003 family operating systems. No additional installation or configuration is required for the FindStr.exe tool.

How to Use the FindStr.exe Tool

To use the FindStr.exe tool, rename the Netlogon.log files, and then save the files to one folder. To parse all of the Netlogon log files, type the following command at a command prompt:

FindStr /I User1 *netlogon*.log >c:\user1.txt

The Replmon and Repadmin Tools

If you have not already verified Active Directory replication on a domain controller, at a command prompt, type repadmin /showreps or replmon to verify that proper Active Directory replication is occurring. In many scenarios, you may find that you unlock an account but the new credentials do not work. This behavior typically occurs because of replication latency. Change the users password in their local site to avoid replication latency issues.

Where to Obtain the Relmon and Repadmin Tools

Both of these tools are included with the support tools on the Windows 2000 CD-ROM.

How to Install and Configure the Replmon and Repadmin Tools

For more information about how to obtain and installing Replmon and Repadmin, see the Windows Support Tools documentation.

Network Monitor

Network Monitor is a powerful tool that you can use to capture unfiltered network communication.

If the account lockout occurs because of a process or program and an account is already locked out on a specific client computer, gather network traces of all traffic to and from that client computer while the account is still locked out. The program or process most likely will continue to send incorrect credentials while trying to gain access to resources that are on the network. Capturing all traffic to and from the client may help you determine which network resource the process is trying to gain access to. After you determine the network resource, you can determine which program or process is running on that client computer.

If you can narrow your search to a specific computer but the user account is not yet locked out, keep running Network Monitor until the lockout occurs for that user. After the lockout occurs, compare the time stamps of events when the in the Netlogon or Security event logs with the data that was captured in the trace. You should see that the network resource that is being accessed with incorrect credentials.

After you identify a program or service as the cause of the lockout, view the software manufacturers Web site for known resolutions. This behavior typically occurs because the program is running with the currently logged on user's credentials. If a service is causing the lockout, consider creating accounts that are specifically for running services so user account password changes do not affect the services.

Where to Obtain Network Monitor

The full version of Network Monitor is included with Microsoft System Management Server (SMS). A limited version of the tool is included with Windows XP and the Windows 2000 and Windows Server 2003 families.

How to Install Network Monitor on Supported Operating Systems

This section describes how to install Network Monitor on both the Windows 2000 Server family and Windows XP.

Windows 2000 Server

To install Network Monitor on computers that are running Windows 2000 Server:

1.

Right-click My Network Places, and then click Advanced.

2.

Click Optional networking components, and then click Management and Monitoring.

For more information, see "HOW TO: Install Network Monitor in Windows 2000" in the Microsoft Knowledge Base.

Windows XP

Network Monitor is included with the Windows support tools. For more information about how to install and configure Network Monitor on computers that are running Windows XP, view the following articles:

"How to Install the Support Tools from the Windows XP CD-ROM" on the Microsoft Knowledge Base.

Description of the Network Monitor Capture Utility on the Microsoft Knowledge Base.

How to Use Network Monitor

For information about how to use Network Monitor to capture information, view the documentation that is provided with the tool or read "How to Capture Network Traffic with Network Monitor" on the Microsoft Knowledge Base.

 

Summary

This document describes the reasons why you should take a structured approach to setting the account and password policy features. The document also provides information about the tools and log files that you can use to troubleshoot account lockouts. After you read this document, you should be able to determine from which computer the account lockouts are being generated, as well as the program or service that is generating the lockout.

 

Appendix One: Additional References for Account Lockout

For more information about how to lock down your environment, as well as for more information about security features that are not addressed in this document, see the following Microsoft Web sites:

"Microsoft Solution for Securing Windows 2000 Server" on the Microsoft TechNet Web site

"Checklist: Create Strong Passwords" on the Microsoft Web site

"New Registry Key to Remove LM Hashes from Active Directory and Security" on the Microsoft Web site

"HOW TO: Configure Remote Access Client Account Lockout in Windows 2000" on the Microsoft Web site

"HOW TO: Prevent Users From Changing a Password Except When Required in Windows 2000" on the Microsoft Web site

"HOW TO: Prevent Users From Submitting Alternate Logon Credentials in Windows 2000" on the Microsoft Web site

"HOW TO: Manage Stored User Names and Passwords on a Computer in a Domain in Windows XP" on the Microsoft Web site

"Best Practices for Enterprise Security" on the Microsoft Web site

 

Appendix Two: Gathering Information to Troubleshoot Account Lockout Issues

You can use the information in this section to help you gather information before you start to troubleshoot account lockout issues. Collect the following information to troubleshoot account lockout issues:

Client Platform

If client account lockouts are occurring on a single, common operating system, there may be specific issues with the operating system. Different operating systems use different processes for name resolution and authentication protocols, and they have different levels of security, so there might be an infrastructure or program issue. For more information, see the Microsoft Knowledge Base article "Service Packs and Hotfixes Available to Resolve Account Lockout Issues" on the Microsoft Web site.

You should gather the following information in these situations:

Do users log on to multiple computers at the same time?

Are there any common patterns? For example:

Do the computers have the same mapped drives?

Do the computers have the same mapped printers?

Do the computers have the same antivirus software?

Do the computers use management software?

Is another networking client installed on the computers?

Is SMS installed on the computers?

Does the network include a Wide Area Network (WAN)?

If the computer is running Windows 95, Windows 98, Windows 98 SE, or Windows Millennium Edition, what is the version of the Vredir.vxd file?

If the computer is running Windows 95, Windows 98, Windows 98 SE, or Windows Millennium Edition, is the Directory Services Client installed on the computer?

Domain Platform

When you know the domain environment, the security boundaries, and how the user is gaining access to the resources that are in other domains, you can better determine the cause of the account lockouts. You should gather the following information:

The number of domain controllers, including operating system, location, service pack level, and so on.

Is Active Directory and Netlogon replication occurring?

What domain does the user log onto?

List all domain trusts that the user uses.

Is there a matching account with the same logon name in the trusted domain?

Are there any third-party SMB servers running in the environment?

Background

Look at the client and the network resources that the user might be contacting to help you determine the cause of the lockouts. You should gather the following information:

When did you first notice the lockouts?

When did the lockouts start?

What has changed in the environment (new programs, new network services, and so on)?

Are there any identifiable patterns:

After a password change?

When the user logs on?

When the user gains access to mapped drives?

When the user uses Outlook?

When the user uses Outlook Web Access?

Are there no identifiable patterns?

How many user accounts are locked out each day, a small group of users or a large group?

Is there an account password policy?

How many bad attempts are allowed before a lockout occurs?

How much time must elapse before the count resets?

What is the LockoutDuration registry value?

Gathering Diagnostic Information

Gather all of the different log files from Netlogon, Kerberos, and the event logs to help you determine the cause of the lockout. Diagnostic information that you gather from the computer from which the lockout is originating may help you determine the cause for the lockout. You should gather the following information:

Netlogon log files

Traces

Event log files from client computers and domain controllers that are involved in the lockout

 

 

 

 

 

 

 



No TrackBacks

TrackBack URL: http://www.skar.us/site/mt-tb.cgi/3247

Leave a comment








*
*

ebhakt
Author Bio          ★★★★★

Author Name:         ebhakt
Author Location:    India
Author Rank:          Writer
Author Status:        
The Green leave stands!!


*
*
*
*
****



*****



    Desktop
  • eBooks
  • Games
  • Softwares
  • Tools
  • Tweaks
  • Wallpapers
  • Warez
    PDA
  • Games
  • Tools
  • Wallpapers
    System Administration
  • dll Center
  • Scripts
  • Tools
  • .extensions database
  • Write-up
    more...
  • Download Database
  • Jobs
  • Lists
  • Polls
  • Glossary

01000011 01110010 01100001 01100011 01101011 01111010 01101000 01100001 01100011 01101011