# Account lockout duration should be retrievable

Account lockout duration is a critical control for preventing brute-force attacks while maintaining usability:

Source: https://maester.dev/docs/tests/AD-PWDPOL-06

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/soulemike" title="Michael Soule · Original author"><img src="https://github.com/soulemike.png" alt="Michael Soule" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/soulemike">Michael Soule</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/ad">Active Directory</a> · Active Directory · Password policy · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-PWDPOL-06
```

## Overview

Account lockout duration is a critical control for preventing brute-force attacks while maintaining usability:

- **Brute-force protection**: Lockouts prevent attackers from trying unlimited password combinations
- **Automatic recovery**: Users can regain access after the duration expires without administrative intervention
- **Balance point**: Too short provides little protection; too long impacts productivity

A lockout duration of at least 30 minutes provides adequate protection against automated attacks while minimizing help desk calls. Setting it to 0 (until administrator unlocks) provides maximum security but requires administrative overhead.

#### Control Type

**Preventive**

#### Security Recommendation

Configure the account lockout duration to at least **30 minutes** for automatic unlock, or set to **0** for manual unlock only (maximum security).

To configure this setting:
1. Open **Group Policy Management**
2. Navigate to the Default Domain Policy
3. Edit: Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Account Lockout Policy
4. Set **Account lockout duration** to **30 minutes or more** (or 0 for manual unlock)

#### How the Test Works

This test retrieves the default domain password policy using `Get-ADDefaultDomainPasswordPolicy` and extracts the `LockoutDuration` value. The test reports:
- Current lockout duration in minutes (or "until administrator unlocks" if 0)
- Recommended minimum (30 minutes)
- Whether the configuration meets security best practices

#### Related Tests

- `Test-MtAdAccountLockoutThreshold` - Checks the number of failed attempts before lockout

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | AD-PWDPOL-06 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Password policy |
| Area | Authentication |
| Resource type | Tenant |
| MITRE ATT&CK | T1110 Brute Force |
| PowerShell test | [Test-MtAdAccountLockoutDuration](https://github.com/maester365/maester/blob/main/tests/ad/password-policy/Test.AD-PWDPOL-06.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:domainDNS.lockoutDuration:ReadProperty |

</details>

## Source

- Test: [`tests/ad/password-policy/Test.AD-PWDPOL-06.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/password-policy/Test.AD-PWDPOL-06.ps1)
- Documentation: [`tests/ad/password-policy/Test.AD-PWDPOL-06.md`](https://github.com/maester365/maester/blob/main/tests/ad/password-policy/Test.AD-PWDPOL-06.md)
