Password Quality Scored At The Boundary
A pwquality drop-in on EL 10 with the length, class and dictionary rules an auditor asks for. Nothing validates pwquality.conf, so the live test scores four passwords and reads why each was refused: a dictionary word by the dictionary check, a password one under the minimum by its length, the same at the minimum accepted, and a passphrase accepted. Original role, live-tested on Rocky Linux 10.
Verification
Live-testedReally deployed to a container sandbox, proven idempotent (a second run changes nothing), verified against the role’s assertions, then torn down.
Conformance
- Static validation (yamllint · ansible-lint)
Provenance
- SHA-256 checksum
- Signature (pending)
Functional
- Live-tested - applied, verified, destroyed
Last verified 2026-09-27 · podman 4.9.3 · ansible 2.21.4 · how we verify
Cite it in your README
badge · attributionPaste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.
[](https://www.iac-bazaar.com/catalog/ansible-password-quality?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)
Ansible role 1.0.0, live-tested on IaC Bazaar: [Password Quality Scored At The Boundary](https://www.iac-bazaar.com/catalog/ansible-password-quality?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)
```yaml
# Password Quality Scored At The Boundary: https://www.iac-bazaar.com/catalog/ansible-password-quality (download from your IaC Bazaar account)
```Preview:
Documentation
password-quality
A password policy proven with passwords. pam_pwquality is already in EL's
authentication stack, so the role owns the policy file and nothing else. The live
test scores four passwords against the live policy and checks the REASON for each
refusal: a password built on a dictionary word, a strong password one character
under the minimum, the same password at the minimum, and a passphrase the policy
must not refuse.
No download, and no version to pin. libpwquality is part of EL 10 and its PAM module is already in the stack. What the role owns is the policy: how long, how varied, and what a password may not contain.
enforce_for_root is in the shipped policy on purpose. Without it, root
setting a password for another account bypasses every rule in the file, which is
how most of these policies come to be decorative.
chpasswd run as root bypasses pwquality entirely. Measured: with this
policy in force, echo user:password | chpasswd succeeded. A test that set a
password as root and called that a pass would prove nothing at all, so the live
test uses pwscore, which scores against the live policy and exits non-zero when
the policy refuses.
Nothing validates the policy file. An unknown key is ignored, so a typo leaves a policy that reads strict and is not. That is why the test asserts the length rule at its BOUNDARY - one character under the minimum must fail and the minimum must pass - rather than reading the number back out of the file it just wrote.
maxclassrepeat shadows every other rule, so this policy disables it. The
setting refuses a password with more than N consecutive characters of one class.
At 4, the value hardening notes usually give, it decides almost every case before
any other rule is consulted. Measured in this role's lane with pwscore, one
password per row and only maxclassrepeat changed between columns:
| password | = 0 (shipped) | = 4 | = 8 |
|---|---|---|---|
Correct-Horse-9x-Battery | accepted, 100 | refused, class run | accepted, 100 |
Inte1rnat2iona3lism4! | accepted, 90 | accepted, 90 | accepted, 90 |
Str4wberry!Fields | accepted, 62 | refused, class run | accepted, 62 |
Internationalism1! | refused, dictionary | refused, class run | refused, class run |
Zx9#Qw7!Lm2$Kp | accepted, 40 | accepted, 40 | accepted, 40 |
At 4 the rule refuses the strongest password in the set and accepts an
interleaved dictionary word, and it silences the dictionary check completely:
with the rule at 4, not one verdict in a nine-password probe changed between
dictcheck = 1 and dictcheck = 0. With the rule disabled, exactly one of those
nine separates them, and that is the password the live test now scores. Set
password_quality_maxclassrepeat if a baseline demands the literal setting, and
know what it costs.
A refusal does not say which rule refused. This test previously scored
password and read its refusal as proof of the dictionary check; pwquality was
refusing it for consecutive lowercase letters, and would have gone on refusing it
with dictcheck = 0. Every refusal the live test asserts now carries the reason
pwquality gave for it.
License
Commercial - IaC Bazaar EULA. (c) IaC Bazaar.
Usage code & full reference need an account
The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.
- Variables
- Test
Related modules
ansible-lynis
Lynis from EPEL on a systemd timer, with the units the package keeps only in its docs, your skipped tests in custom.prf, and a minimum hardening index below which the audit unit fails, so a falling score shows as a failed unit. The live test runs the audit, reads the index and the tests that ran, and finds the timer enabled. Original role, live-tested on Rocky Linux 10.
ansible-suricata
Suricata from EPEL watching the default-route interface as the suricata user, ET Open fetched at install and refreshed daily, plus a canary rule that proves the sensor is alive. A root-run check left root-owned logs and a daemon recording nothing; the role prevents it. The live test raises the canary alert while a second lookup is logged, not alerted. Original role, live-tested on Rocky Linux 10.
ansible-aide
AIDE from AppStream on EL 10: a watched tree, a baseline database built once, and the oneshot unit and timer the package does not ship. The live test passes on an unchanged host, FAILS when a file appears inside a watched path and names it, ignores one inside an excluded path, and passes again once the change is gone. Original role, live-tested on Rocky Linux 10.
ansible-389-ds
389 Directory Server from AppStream. A fresh instance listens on every interface and lets anonymous clients read the tree; this role binds both listeners to loopback and limits anonymous clients to the rootDSE. The live test adds a user who binds, sees a wrong password and an anonymous search refused, and reads the LDAPS certificate. Original role, live-tested on Rocky Linux 10.
ansible-krb5-kdc
An MIT Kerberos KDC: the realm created once with a stash, kadmind behind an ACL, a default policy that locks an account after five wrong passwords, every listener on loopback. The KDC starts on a broken config without a word, so the live test proves each setting by behaviour: the ticket lifetime, the refusals, the lockout. Original role, live-tested on Rocky Linux 10.
ansible-authelia
Authelia from the upstream release (sha256-verified) as a hardened system service on loopback with file users and sqlite; its secrets are generated once on the host and reach the service as AUTHELIA_*_FILE variables. The live test hashes a password with Authelia's hasher, logs in, sees a wrong password refused and an anonymous visitor sent to the portal. Original role, live-tested on Rocky 10.