mediumMultiple Choice
XK0-006 Practice Question: The company password policy requires minimum…
The company password policy requires minimum length, complexity, and that passwords cannot be based on dictionary words. Which file should be edited to configure these settings via pam_pwquality?
⚠ Common exam trap
Candidates often confuse the PAM service file (which invokes the module) with the module's configuration file, leading them to choose /etc/pam.d/system-auth or /etc/pam.d/password-auth instead of /etc/security/pwquality.conf.
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
✓
/etc/security/pwquality.conf
The pam_pwquality module enforces password quality rules such as minimum length, complexity, and dictionary checks. Its configuration file is /etc/security/pwquality.conf, where parameters like minlen, dcredit, ucredit, lcredit, ocredit, and dictcheck are set. Editing this file directly controls the PAM module's behavior without modifying PAM service files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
/etc/security/pwquality.conf
Why this is correct
/etc/security/pwquality.conf is the pam_pwquality configuration file, holding directives such as minlen, minclass and dictcheck that enforce length, complexity and dictionary-word rejection. Editing it satisfies the stem's requirement to configure those three password policy settings centrally, rather than through PAM stack arguments in /etc/pam.d files.
- ✗
/etc/login.defs
Why it's wrong here
/etc/login.defs sets defaults such as PASS_MAX_DAYS and uid ranges for useradd, but it holds no pwquality parameters, so length, complexity and dictionary settings would not apply. It is tempting because it is the classic password-ageing file, and it would be correct for configuring expiry and minimum/maximum password lifetime.
- ✗
/etc/pam.d/system-auth
Why it's wrong here
On Debian/Ubuntu systems pwquality settings belong in /etc/security/pwquality.conf; /etc/pam.d/system-auth is the Red Hat family PAM stack file, so editing it on Debian has no effect. It is tempting because that path does hold pam_pwquality arguments on RHEL-based hosts.
- ✗
/etc/pam.d/password-auth
Why it's wrong here
/etc/pam.d/password-auth governs authentication for login services, not the pwquality module's password checks, so edits there would not enforce length, complexity or dictionary rules. It is tempting because it is a PAM stack file, and it would be correct for configuring account lockout or authentication behaviour through pam_faillock.
Go deeper
Related to this question
Learn chapter
Networking Fundamentals and Configuration
Key term
Policy
A policy is a set of rules or guidelines that defines how an organization manages, secures, and operates its IT systems and services.
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.