Account lockout

On this page 7

Account lockout is a security control that disables sign-in to an account after a defined number of consecutive failed authentication attempts, either for a fixed period or until an administrator or the user restores access. In identity & access management within cybersecurity, it is one of the oldest defenses against online password guessing, because it caps how many guesses an attacker can make against a single account.

The control is simple to describe but difficult to tune. A threshold that is too strict turns lockout into a denial-of-service weapon against legitimate users, while a threshold that is too loose provides little protection. Modern guidance therefore treats lockout as one layer among several, combined with throttling, MFA and anomaly detection, rather than as a standalone safeguard.

How account lockout works

An account lockout mechanism counts failed sign-in attempts per account and blocks further attempts once the count reaches a lockout threshold. The authentication service stores a counter, a timestamp of the first failure and, once triggered, the time at which the lock expires.

Three parameters define the behavior. The threshold sets how many failures are tolerated, the observation window (sometimes called the reset counter interval) defines how long failures are remembered, and the lockout duration decides how long the account stays blocked. A successful sign-in normally resets the counter to zero.

The table below summarizes the core parameters and the values commonly seen in enterprise directories and web applications.

ParameterTypical rangeWhat it controls
Lockout threshold5 to 10 failuresHow many wrong attempts trigger the lock
Observation window15 to 30 minutesHow long failed attempts are counted
Lockout duration15 minutes to permanentHow long the account remains blocked
Counter resetOn success or window expiryWhen the failure count returns to zero
Unlock methodTimer, self-service, help deskWho or what restores access
Core account lockout parameters

Where the counter lives matters. In a centralized directory such as Active Directory, the lock applies to every service that authenticates against it. In federated setups, the identity provider usually enforces lockout, so applications using SSO through SAML or OpenID Connect inherit its policy rather than keeping their own counters.

Types of lockout policies

Lockout policies differ mainly in how access is restored and how aggressively attempts are slowed. Choosing a type is a balance between security, user friction and support cost.

Policy typeBehaviorBest suited for
Time-based lockoutUnlocks automatically after a set periodGeneral workforce and consumer accounts
Permanent lockoutRequires administrator action to unlockPrivileged and high-value accounts
Progressive delayWait time grows with each failurePublic web applications
Soft lockoutRequires extra verification such as a CAPTCHAConsumer services with large user bases
Risk-based lockoutBlocks only suspicious attempts by contextOrganizations with mature identity platforms
Common lockout policy types

Progressive delay, also called exponential backoff, is often preferred to hard lockout because it slows automated guessing without fully denying the real user. Risk-based approaches go further: they evaluate source IP reputation, device fingerprint and geolocation, and lock only the suspicious session while allowing the recognized device to continue.

Account lockout is one of several rate-limiting defenses, and it is frequently confused with throttling and with session expiry. The comparison below clarifies what each control protects and where it falls short.

ControlScopeMain strengthMain weakness
Account lockoutPer accountCaps guesses on one accountEnables targeted denial of service
IP throttlingPer source addressSlows a single attacking hostBypassed by distributed botnets
MFAPer sign-inStops use of stolen passwordsPush fatigue and phishing risks
Token expirationPer sessionLimits reuse of stolen tokensDoes not limit password guessing
Breached password screeningPer credentialBlocks known leaked passwordsCannot detect unknown leaks
Lockout versus related authentication controls

The key insight is that lockout protects individual accounts against brute force, but it does little against password spraying, where an attacker tries one or two common passwords across thousands of accounts and stays below every per-account threshold. Detecting spraying requires aggregate monitoring across accounts, typically in the identity provider or a security information and event management platform.

Configuring lockout in practice

Effective configuration starts from the threat model and the strength of other controls. Current NIST SP 800-63B guidance requires verifiers to limit consecutive failed attempts to no more than 100 on a single account, which is far looser than traditional values, because it assumes rate limiting and strong password screening are also in place.

Older baselines often recommended thresholds of three to five attempts, which generated large help desk volumes from users mistyping passwords. Many organizations now use ten failures with a 15-minute automatic unlock for standard accounts and stricter rules only for privileged identities.

SituationRecommended approachReason
Workforce accounts with MFA10 failures, 15-minute unlockMFA already blocks most password misuse
Administrator accountsLow threshold, manual unlockCompromise impact is severe
Public consumer loginProgressive delay plus CAPTCHAAvoids mass lockout by attackers
Service accountsExclude and monitor insteadLockout can stop critical systems
Passwordless sign-inRate limit the fallback pathPasskeys resist guessing by design
Lockout decisions by situation
  • Return the same error message for a wrong password and a locked account to avoid revealing account state.
  • Apply lockout to every authentication path, including legacy protocols, APIs and password reset flows.
  • Log lockout events and alert on unusual volumes, which often indicate an active attack.
  • Offer self-service unlock protected by a second factor to reduce help desk load.

Limitations, risks and common mistakes

The most serious limitation is that lockout can be turned against the organization. An attacker who knows usernames can deliberately enter wrong passwords to lock out executives, help desk staff or an entire user population, creating a denial-of-service condition without ever breaching an account.

Another frequent failure is inconsistent enforcement. Legacy protocols such as basic authentication over IMAP or older remote access gateways sometimes bypass the lockout counter entirely, giving attackers an unlimited guessing channel. Cached credentials on mobile devices can also produce repeated lockouts after a password change, because the old password keeps being submitted in the background.

SymptomLikely causeFix
Repeated lockouts after password changeStale credentials on a deviceFind the source in logs and update it
Many accounts locked at onceMalicious lockout or sprayingBlock source and enable risk-based rules
Attack succeeds without lockoutsLegacy protocol bypassDisable legacy authentication
Username enumeration possibleDistinct locked-account messageUse one generic error message
Lockout problems and their fixes

Finally, lockout does nothing against credential stuffing with correct passwords or against phishing that captures valid credentials. Organizations that rely on lockout alone often overestimate their protection; MFA, passkeys based on FIDO2 and breached password checks address the threats that lockout cannot.

A non-technical view

Account lockout works like a bank card that is swallowed by the cash machine after too many wrong PIN entries. The system assumes that someone who keeps guessing is probably not the owner, so it stops accepting attempts for a while.

The difficulty is finding the right balance. If the lock is too strict, honest people who mistype their password get stuck and must call for help. If it is too lenient, a stranger can keep guessing. The main takeaway is that lockout is a useful safety catch, but it works best together with a second sign-in step such as a code on your phone.

A concrete example

A regional hospital with about 4,000 staff accounts originally locked accounts after three failed attempts with manual unlock. Nurses who changed passwords often stayed signed in on shared workstations and phones, and the old passwords triggered lockouts several times a day. The help desk logged hundreds of unlock tickets each month, and clinicians sometimes lost access during shifts.

The security team moved to ten failures within 15 minutes with automatic unlock, required MFA for all remote access and disabled legacy mail protocols. They also set alerts for more than 50 lockouts per hour across the directory. Unlock tickets fell by roughly 80 percent, and a later password spraying attempt was detected through the aggregate alert even though no single account reached its threshold.