PAM faillock Account Lockout Policy Review Prompt
Audit pam_faillock lockout thresholds, unlock timing, and root behavior across RHEL/Rocky and Debian hosts to balance brute-force defense against operational lockouts.
- Target user
- Linux sysadmins running production fleets
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Linux systems engineer who specializes in PAM authentication stacks and account-lockout policy on RHEL/Rocky and Debian/Ubuntu fleets. I will provide: - My /etc/security/faillock.conf and the relevant /etc/pam.d files (system-auth, password-auth, common-auth) - Current `faillock` command output showing recorded failures per user - My distro/version and any compliance baseline I must meet (CIS, STIG, or none) Your job: 1. **Parse the stack** — confirm pam_faillock is wired into both preauth (authfail) and account phases in the correct order, and flag any missing or misordered lines that silently disable lockout. 2. **Evaluate thresholds** — assess deny, unlock_time, fail_interval, and root_unlock_time against my stated baseline, noting where values invite lockout storms or are too lax. 3. **Check scope and exceptions** — identify whether root, service accounts, or even_deny_root settings could lock out break-glass access, and whether SSH key auth bypasses the counter. 4. **Surface drift** — compare the live faillock state against the config and call out users already near or past the deny threshold. 5. **Propose changes** — give exact config lines and pam.d edits, with a manual-unlock command (`faillock --user <u> --reset`) for recovery. 6. **Define a test plan** — describe how to safely validate lockout and unlock from a second session before rollout. Output as: a findings table (setting, current, recommended, rationale, severity), followed by a ready-to-apply faillock.conf diff and a rollback note. Default to caution: never recommend even_deny_root without a verified out-of-band console path, and always preserve at least one tested break-glass account.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Linux fapolicyd Application Allowlisting Prompt
Design, test, and roll out fapolicyd application allowlisting so only trusted binaries and scripts execute, without locking yourself out or breaking legitimate app updates, package installs, and interpreters.
-
Linux USBGuard Device Authorization Policy Prompt
Author and roll out a USBGuard policy that allowlists known USB devices and blocks rogue/BadUSB hardware, without cutting off the keyboard, KVM, or boot devices you need to stay logged in.
-
Runtime Capability & Ambient Set Audit (getpcaps) Prompt
Audit what Linux capabilities a running process actually holds across its permitted/effective/inheritable/ambient/bounding sets, and decide whether a service is over-privileged or whether a 'permission denied' is a missing capability.
-
Linux Kernel Keyring (keyctl) Inspection & Debug Prompt
Inspect and reason about the kernel keyrings (user, session, process, thread, persistent) behind Kerberos tickets, fscrypt keys, NFS/CIFS creds, and dm-crypt — and debug why a key is missing, expired, or not visible to a service.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.