# FreeIPA Password Policies in Practice: Expiration, Lockout and Authentication Behavior

Source: https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice
Language: en
Published: 2026-09-19
Updated: 2026-11-21

FreeIPA password policies on Fedora 44: validate expiration, requirements, account lockout, test users and client impact.

## Overview

Part 4 of the Identity series tests FreeIPA password policies in practice: global policy, group policy, minimum length, character classes, history, minimum lifetime, password expiration, admin reset, failed login counters, account lockout, unlock and account expiration.

All CLI commands and outputs are rendered as selectable text and code blocks. Screenshots are used only for the FreeIPA Web UI.

[![FreeIPA Web UI after authenticated login](https://forgeone.solutions/media/identity-c2-01-authenticated-dashboard.png)](https://forgeone.solutions/media/identity-c2-01-authenticated-dashboard.png)

FreeIPA Web UI after authenticated login. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Lab Setup

```bash
Server:        ipa01.example.test
Client:        client01.example.test
Domain:        example.test
Realm:         EXAMPLE.TEST
Distribution:  Fedora 44
FreeIPA:       4.13.3
SSSD:          2.13.1
SELinux:       Enforcing
```

## Which Password Policy FreeIPA Uses

FreeIPA has a global password policy and can apply additional group-specific policies. The lab first captured the real defaults.

```bash
ipa pwpolicy-show
ipa pwpolicy-find
```

```bash
Group: global_policy
Max lifetime (days): 90
Min lifetime (hours): 1
History size: 0
Character classes: 0
Min length: 8
Max failures: 6
Failure reset interval: 60
Lockout duration: 600
Grace login limit: -1
```

[![FreeIPA password policy overview with global_policy and policy-users](https://forgeone.solutions/media/identity-c2-02-password-policy-overview.png)](https://forgeone.solutions/media/identity-c2-02-password-policy-overview.png)

FreeIPA password policy overview with global\_policy and policy-users. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

[![Global FreeIPA password policy](https://forgeone.solutions/media/identity-c2-03-global-policy.png)](https://forgeone.solutions/media/identity-c2-03-global-policy.png)

Global FreeIPA password policy. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Group-specific Password Policy

The lab created the synthetic policy-users group and attached a group-specific policy. Priority controls which policy applies when a user belongs to multiple policy groups.

```bash
ipa group-add policy-users --desc='C2 password policy users'
ipa pwpolicy-add policy-users \
  --priority=10 \
  --minlength=12 \
  --minclasses=2 \
  --history=2 \
  --minlife=0 \
  --maxlife=1 \
  --maxfail=3 \
  --failinterval=30 \
  --lockouttime=60
```

```bash
Group: policy-users
Max lifetime (days): 1
Min lifetime (hours): 0
History size: 2
Character classes: 2
Min length: 12
Priority: 10
Max failures: 3
Failure reset interval: 30
Lockout duration: 60
Grace login limit: -1
```

[![Group-specific FreeIPA password policy policy-users](https://forgeone.solutions/media/identity-c2-04-group-policy-policy-users.png)](https://forgeone.solutions/media/identity-c2-04-group-policy-policy-users.png)

Group-specific FreeIPA password policy policy-users. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

[![FreeIPA group policy-users with test users](https://forgeone.solutions/media/identity-c2-05-policy-users-group.png)](https://forgeone.solutions/media/identity-c2-05-policy-users-group.png)

FreeIPA group policy-users with test users. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Minimum Length and Character Classes

A deliberately invalid password was rejected. This output comes from the real kinit password-change flow on the client.

```bash
Password expired. You must change it now.
Password change rejected: Password does not contain enough character classes
Password not changed.
```

## Password History

After two valid changes, the lab attempted to reuse an earlier password. FreeIPA rejected the reuse.

```bash
Password change rejected: New password was used previously. Please choose a different password.
```

## Minimum Lifetime

With minlife set to 1, an immediate user-initiated password change was blocked. The lab then restored minlife to 0 for the remaining tests.

```bash
Password change rejected: Current password's minimum life has not expired
Password not changed.
```

## Password Expiration

The lab forced policy-expired into the past. The next kinit required a password change and then issued a Kerberos ticket.

```bash
ipa user-mod policy-expired --password-expiration=20000101000000Z
```

```bash
Password expired. You must change it now.
Ticket cache: KCM:1001
Default principal: policy-expired@EXAMPLE.TEST
```

[![FreeIPA user policy-expired for password expiration](https://forgeone.solutions/media/identity-c2-08-policy-expired-user.png)](https://forgeone.solutions/media/identity-c2-08-policy-expired-user.png)

FreeIPA user policy-expired for password expiration. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Administrator Reset

An admin reset with ipa passwd was tested separately. The next user login had to change the temporary password.

```bash
ipa passwd policy-reset
```

[![FreeIPA user policy-reset after admin reset](https://forgeone.solutions/media/identity-c2-11-admin-reset-user.png)](https://forgeone.solutions/media/identity-c2-11-admin-reset-user.png)

FreeIPA user policy-reset after admin reset. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Failed Logins and Account Lockout

The lockout test separates two phases: failed attempts below the threshold, then three consecutive failures until lockout.

```bash
attempt_1_rc=1
attempt_2_rc=1
valid_before_threshold_rc=0
attempt_3_rc=1
attempt_4_rc=1
attempt_5_rc=1
valid_after_threshold_rc=1
```

```bash
Account disabled: False
Server: ipa01.example.test
Failed logins: 3
Last failed authentication: 20260919225833Z
```

[![FreeIPA user policy-lock after lockout test and recovery](https://forgeone.solutions/media/identity-c2-07-policy-lock-user.png)](https://forgeone.solutions/media/identity-c2-07-policy-lock-user.png)

FreeIPA user policy-lock after lockout test and recovery. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Unlocking the Account

The locked user was recovered with ipa user-unlock. After unlock, kinit and SSH worked again.

```bash
ipa user-unlock policy-lock
kinit policy-lock
ssh policy-lock@client01.example.test
```

## Account Expiration

Account expiration was tested independently from password expiration. Identity lookup still worked, but kinit and SSH were denied.

```bash
ipa user-mod policy-account-expired --principal-expiration=20000101000000Z
```

```bash
policy-account-expired:*:40800010:40800010:Policy AccountExpired:/home/policy-account-expired:/bin/bash
uid=40800010(policy-account-expired) gid=40800010(policy-account-expired) groups=40800010(policy-account-expired),40800003(policy-users)
kinit: Client's entry in database has expired while getting initial credentials
ssh_rc=5
```

[![FreeIPA user policy-account-expired with account expiration](https://forgeone.solutions/media/identity-c2-09-account-expired-user.png)](https://forgeone.solutions/media/identity-c2-09-account-expired-user.png)

FreeIPA user policy-account-expired with account expiration. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Disabled vs Locked vs Password Expired vs Account Expired

| State | Identity lookup | kinit | SSH | Recovery |
| --- | --- | --- | --- | --- |
| Disabled user | Yes | Credentials revoked | Failure | ipa user-enable |
| Locked user | Yes | Failure after threshold | Failure in final run | ipa user-unlock or lockout expiry |
| Password expired | Yes | Password change required | Works after change | User change or admin reset |
| Account expired | Yes | Entry expired | Failure | Adjust principal expiration |

[![Disabled FreeIPA user policy-disabled](https://forgeone.solutions/media/identity-c2-10-disabled-user.png)](https://forgeone.solutions/media/identity-c2-10-disabled-user.png)

Disabled FreeIPA user policy-disabled. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## What the Linux Client Sees

The client was tested with SSSD, Kerberos and SSH. The important distinction: identity resolution through getent or id is not the same as permitted authentication.

```bash
getent passwd policy-valid
id policy-valid
kinit policy-valid
klist
ssh policy-valid@client01.example.test
sssctl user-checks policy-valid
journalctl -u sssd --no-pager
```

[![FreeIPA user policy-valid with applied password policy](https://forgeone.solutions/media/identity-c2-06-policy-valid-user.png)](https://forgeone.solutions/media/identity-c2-06-policy-valid-user.png)

FreeIPA user policy-valid with applied password policy. Screenshot from the isolated FreeIPA C2 lab with trusted lab CA.

## Result Check

| Area | Check | Expected result | Status |
| --- | --- | --- | --- |
| Global policy | pwpolicy-show/find | Defaults visible | PASS |
| Group policy | policy-users | Group policy applies | PASS |
| Minimum length | invalid change | Policy violation is rejected | PASS |
| History | reuse password | Reuse is rejected | PASS |
| Expiration | expire password | kinit forces change | PASS |
| Admin reset | ipa passwd | User must change password | PASS |
| Lockout | failed attempts | User is locked | PASS |
| Recovery | ipa user-unlock | Login works again | PASS |
| Account expiration | expired principal | kinit/SSH fail | PASS |
| Web UI | trusted-CA login | screenshots authenticated | PASS |
| CLI | code/text instead of terminal images | copyable evidence | PASS |

## Limits of This Lab

- The Web UI screenshots used a documented lab-port workaround because the host could not bind privileged TCP/443.
- The policy values are intentionally short and synthetic so expiration and lockout can be reproduced.
- Production policies need coordinated helpdesk, recovery, MFA and emergency processes.

## Identity Management with FreeIPA and Keycloak

## Technical Acceptance

Password policies must be tested from the user perspective: wrong passwords, lockout, reset, expiration and the following login belong in acceptance.

```bash
ipa pwpolicy-show
ipa pwpolicy-mod --minlength=14 --history=5
ipa user-mod opsallowed --password-expiration=20261010090000Z
kinit opsallowed
faillock --user opsallowed || true
journalctl -u sssd --since "15 minutes ago"
```

| Area | Check | Result |
| --- | --- | --- |
| Policy | pwpolicy-show documents active values | PASS required |
| Complexity | too weak password is rejected | PASS required |
| Expiration | password expiration creates expected behavior | PASS required |
| Lockout | failed attempts lead to controlled lockout | PASS required |
| Recovery | reset/unlock is documented | PASS required |
| Client | SSSD/PAM shows expected behavior | PASS required |

## Do Not Skip This

- Do not only set policy in UI; test it on a client.
- Choose lockout values carefully to avoid locking out admins.
- Ensure break-glass access before lockout tests.
- Document helpdesk process for reset and unlock.

## Hero image

[![FreeIPA password policy overview with global\_policy and policy-users](https://forgeone.solutions/media/identity-c2-02-password-policy-overview.png)](https://forgeone.solutions/media/identity-c2-02-password-policy-overview.png)

## Author

Mathias Rumbold

## Category

- [Identity & Access](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?category=identity-access)

## Tags

- [FreeIPA](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=freeipa)
- [Identity Management](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=identity-management)
- [Linux](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=linux)
- [Kerberos](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=kerberos)
- [Security](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=security)
- [Red Hat IdM](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=red-hat-idm)
- [fedora](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice?tags=fedora)

## Need reliable identity policy testing?

ForgeOne supports FreeIPA, Red Hat IdM, Keycloak, Linux client integration, SSO, MFA and documented operations.

[Discuss an identity project](https://forgeone.solutions/en/contact)

## Identity Management mit FreeIPA und Keycloak

Die Beiträge bauen praktisch aufeinander auf: Fedora-44-basierter FreeIPA-Server, Linux-Clients, Identity-Lifecycle, Passwort-Richtlinien, HBAC, sudo-Regeln, Kerberos-Keytabs, Updates, Backup, Recovery und Hochverfügbarkeit.

1. [Installing FreeIPA: From the First Server to an Enrolled Linux Client](https://forgeone.solutions/en/tech/install-freeipa)
2. [Connect Linux Clients to FreeIPA: SSSD, Kerberos and Centralized Users](https://forgeone.solutions/en/tech/connect-linux-clients-freeipa-sssd-kerberos-centralized-users)
3. [Managing FreeIPA Users and Groups: Identity Lifecycle in Practice](https://forgeone.solutions/en/tech/managing-freeipa-users-groups-identity-lifecycle-practice)
4. [FreeIPA Password Policies in Practice: Expiration, Lockout and Authentication Behavior (current part)](https://forgeone.solutions/en/tech/freeipa-password-policies-expiration-lockout-practice)
5. [FreeIPA HBAC in Practice: Control SSH Access by User, Group and Host](https://forgeone.solutions/en/tech/freeipa-hbac-ssh-access-user-group-host-practice)
6. [FreeIPA sudo rules in practice: delegate commands without root passwords](https://forgeone.solutions/en/tech/freeipa-sudo-rules-command-delegation-practice)
7. [Kerberos service principals and keytabs with FreeIPA in practice](https://forgeone.solutions/en/tech/freeipa-kerberos-service-principals-keytabs-practice)
8. [Updating FreeIPA: package updates, replicas and client compatibility checks](https://forgeone.solutions/en/tech/freeipa-update-package-updates-replicas-client-compatibility)
9. [FreeIPA backup in practice: ipa-backup, certificates, LDAP and recovery windows](https://forgeone.solutions/en/tech/freeipa-backup-ipa-backup-certificates-ldap-recovery)
10. [FreeIPA disaster recovery: restore, replica rebuilds and emergency access testing](https://forgeone.solutions/en/tech/freeipa-disaster-recovery-restore-replica-rebuild-emergency-access)
11. [Running FreeIPA highly available: replication, CA roles, DNS and maintenance workflows](https://forgeone.solutions/en/tech/freeipa-high-availability-replication-ca-dns-maintenance)
