Courseiva
SecuritymediumMultiple ChoiceObjective-mapped

XK0-006 Security Practice Question

A system administrator needs to monitor file access attempts to /etc/shadow using auditd. Which auditctl command sets up the watch?

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 -w /etc/shadow -p wa -k shadow_watch

The correct syntax is 'auditctl -w /etc/shadow -p wa -k shadow_watch'. The -w specifies the file, -p wa watches for write and attribute changes (access is implied), but the -k is for a key. The other options have incorrect flags or order.

Answer analysis

Option-by-option breakdown

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

  • auditctl -a always,exit -F path=/etc/shadow -F perm=wa -k shadow_watch

    Why it's wrong here

    The `perm=wa` rule specified here only monitors write and attribute modification events, which fails to capture read access attempts to `/etc/shadow`. The question asks to monitor *file access attempts*, implying a broader scope including reads. This option is tempting as auditing writes and attribute changes is crucial for detecting unauthorised tampering with the file's content or permissions. It would be the correct command if the specific requirement was to track only modifications to `/etc/shadow`, rather than all forms of access.

  • auditctl -W /etc/shadow -p rwxa -k shadow_watch

    Why it's wrong here

    -W is invalid; should be -w. rwxa is not standard.

  • auditctl -w /etc/shadow -k shadow_watch

    Why it's wrong here

    Missing -p flag; no permission filter, so watches all, but not explicit.

  • auditctl -w /etc/shadow -p wa -k shadow_watch

    Why this is correct

    Correct use of -w to watch file with write and attribute permissions.

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 →

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.