Courseiva
mediumMultiple Choice

XK0-006 Practice Question: Refer to the exhibit

Exhibit

Refer to the exhibit.

# auditctl -l
-w /etc/passwd -p wa -k passwd_changes
-w /etc/shadow -p wa -k shadow_changes
-w /etc/group -p wa -k group_changes

Refer to the exhibit. The system administrator runs the command 'auditctl -l' and sees the above rules. What is the purpose of these audit rules?

⚠ Common exam trap

It's easy for candidates to confuse the `-p wa` permission (write and attribute) with read access, assuming that watching these files logs all access, when in fact only modifications are recorded.

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

✓

To log any changes (write or attribute) to the password, shadow, and group files

The audit rules use the `-w` flag to watch the files `/etc/passwd`, `/etc/shadow`, and `/etc/group` for `wa` (write and attribute change) syscalls. This logs any modification to these critical authentication and authorization files, such as user additions, password changes, or permission changes, which is essential for security monitoring.

Answer analysis

Option-by-option breakdown

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

  • ✓

    To log any changes (write or attribute) to the password, shadow, and group files

    Why this is correct

    These auditctl rules watch /etc/passwd, /etc/shadow and /etc/group with write and attribute permissions, generating audit records whenever those files are modified. This satisfies the stem's requirement to log changes to the password, shadow and group files.

  • ✗

    To log all successful login attempts on the system

    Why it's wrong here

    Successful logins are recorded through watches on authentication paths such as /var/log/faillog or PAM-related files with specific syscall filters, not by file watches on account databases. It is tempting because login auditing is a standard requirement, and dedicated rules for authentication events would be the right choice.

  • ✗

    To log any modifications to the audit configuration itself

    Why it's wrong here

    Auditing the audit configuration itself requires watches on /etc/audit/ and auditd.conf with write and attribute-change permissions; file-access rules on account databases do not cover those paths. It is tempting because tampering with auditd is a recognised threat, and such watches would be correct for detecting configuration changes.

  • ✗

    To log all read accesses to /etc/passwd, /etc/shadow, and /etc/group

    Why it's wrong here

    The rules' watch keys and permission filters determine which file accesses are recorded; a rule set targeting write and attribute-change events would not capture read accesses. It is tempting because auditing /etc/passwd, /etc/shadow and /etc/group is a common hardening goal, but that requires read-permission watches on those paths.

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 →

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.