XK0-006 Security Practice Question
A system administrator wants to monitor changes to the /etc/passwd file using auditd. Which auditctl command sets up a watch on this file?
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
✓
auditctl -a always,exit -F path=/etc/passwd -F perm=wa
The correct command is `auditctl -a always,exit -F path=/etc/passwd -F perm=wa`. This creates a syscall-based audit rule that triggers on every syscall that accesses /etc/passwd with write (w) or attribute change (a) permissions, effectively monitoring any changes to the file. Option D uses `-w` for a file watch but with `-p rwxa`, which monitors reads and executes as well—not just changes—making it less precise for monitoring changes only.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ausearch -f /etc/passwd
Why it's wrong here
ausearch is used to search audit logs, not to set up audit rules. This command would attempt to display events related to /etc/passwd but it does not create a watch.
- ✓
auditctl -a always,exit -F path=/etc/passwd -F perm=wa
Why this is correct
This is correct. It creates a syscall-based audit rule that triggers on any syscall accessing /etc/passwd with write or attribute change permissions, which effectively monitors changes.
- ✗
aureport -f /etc/passwd
Why it's wrong here
aureport generates summary reports from audit logs, it does not create watches.
- ✗
auditctl -w /etc/passwd -p rwxa
Why it's wrong here
This command uses the -w file watch syntax with -p rwxa. While it does create a watch on /etc/passwd, the permissions rwxa include read and execute, so it monitors more than just changes. For monitoring changes only, the correct permissions would be wa (write and attribute change).
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.