Courseiva
Security →easyMultiple Choice

XK0-006 Security Practice Question

A Linux administrator wants to prevent users from reusing their last five passwords. Which PAM module should be configured?

⚠ Common exam trap

A common mix-up: candidates confuse pam_pwquality (which enforces password strength) with pam_pwhistory (which enforces password reuse prevention), leading them to select pam_pwquality when the question specifically asks about preventing reuse of previous passwords.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

pam_pwhistory

The pam_pwhistory module is specifically designed to enforce password history policies by storing a user's previous passwords in a separate file (e.g., /etc/security/opasswd) and preventing reuse of those passwords. By configuring the 'remember' option in the PAM stack, the administrator can set the number of previous passwords that cannot be reused, such as 'remember=5' to block the last five passwords.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    pam_faillock

    Why it's wrong here

    pam_faillock locks accounts after repeated failed authentication attempts, addressing brute-force lockout rather than password history. Preventing reuse of the last five passwords requires pam_pwhistory, which stores previous hashes and rejects matches. pam_faillock is correct when the requirement is temporary account lockout after failed logins.

  • ✗

    pam_pwquality

    Why it's wrong here

    pam_pwquality enforces complexity rules such as length, character classes, and dictionary checks at password change time. It does not retain previous password hashes, so it cannot detect reuse. pam_pwquality is correct when the requirement is enforcing minimum length or mixed-character composition, not history.

  • ✗

    pam_unix

    Why it's wrong here

    pam_unix performs standard password verification against the shadow file and handles account ageing, but it keeps no history of prior hashes. Preventing reuse of the last five passwords requires pam_pwhistory with remember=5. pam_unix is correct when the requirement is basic authentication or password expiry management.

  • ✓

    pam_pwhistory

    Why this is correct

    Configuring pam_pwhistory with the remember=5 parameter stores previous password hashes and rejects any new password matching them, directly enforcing the five-password reuse restriction in the stem. It hooks into the password stack, so changes are blocked at the point of update rather than merely advised.

About these practice questions

This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.