Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Linux Admins Difficulty: Intermediate ClaudeChatGPT

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

More Linux Admins prompts & error guides

Browse every Linux Admins prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.