Exchange 2010 - OWA - Lock user after x amount of failed logins
Published: 19-12-2012 | Author: Remy van Elst | Text only version of this article
❗ This post is over nine years old. It may no longer be up to date. Opinions may have changed.
Table of Contents
This is a tutorial to set up automatic user lockout in Exchange 2010 - Outlook Web Acces (OWA). When a user does 5 wrong login attempts, he/she is locked out from the webinterface. After for example 5 minutes he or she is unlocked again automatically. This helps you mitigate brute force attacks, since an attacker can only try 1 password/minute, but the user will not be blocked for to long. Exchange 2010 has some special register settings to make IIS stop caching, otherwise it would not work.
I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.
Group Policy settings
Execute the following steps on one of your domain controllers.
Administrative Tools ->
Group Policy Editor.
Right click the "Default Domain Policy" (or any other policy where you might want to apply this).
Computer Configuration ->
Windows Settings ->
Security Settings ->
Account Policies ->
Account Lockout Policy.
Set the following values: - "Account Lockout Duration": 5 minutes - "Account Lockout Threshold": 5 invalid logon attempts - "Reset Account Lockout Counter After": 5 minutes
Adapt this to your own time/threshold if you feel so.
Also make sure the group policy is enforced.
Lets move on to IIS to make sure that OWA does not cache the login token.
IIS / OWA
If you have set the above group policy and you test in on the outlook web access of the exchange server, you will notice that if you have done more than 5 failed logins you can still login with the good password.
On your IIS server(s) where OWA resides execute the following:
Navigate to the following key:
Edit menu, then the
Add menu, select a
32 bit DWORD (or just
Then set its value to
30. This means that user tokens will be cached for 30
seconds by IIS.
Now that is also solved.
Bonus: Active Directory Saved Search to view Locked Out users
Active Directory Users && Computers window from the
Right Click the
Saved Queries, select
Locked Out users Description:
Define Query. Click the
Find dropdown, select
Custom Search. Select
Paste the following LDAP Query:
Now if a users calls you that they cannot login, you can see if they are locked out via that Saved Search. (Note that you might have to refresh the view a few times before seeing it.)Tags: exchange , microsoft , outlook , outlook-web-access , owa , server-2008 , tutorials , windows