Courseiva
hardMultiple ChoiceObjective-mapped

XK0-006 Practice Question: A company requires that all systems be configured…

A company requires that all systems be configured to log all authentication attempts, both successful and failed. Which configuration file and directive should be used to ensure all auth messages are logged to /var/log/secure?

⚠ Common exam trap

Many candidates confuse the `auth` and `authpriv` facilities, assuming `auth.*` is correct because it sounds like 'authentication', but `authpriv` is the actual facility used by modern Linux authentication subsystems like PAM and sshd.

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

In /etc/rsyslog.conf: authpriv.* /var/log/secure

In rsyslog, the `authpriv` facility covers authentication and authorization messages, including both successful and failed login attempts. The directive `authpriv.* /var/log/secure` directs all messages from this facility to `/var/log/secure`, which is the standard secure log file on RHEL/CentOS systems. This meets the requirement to log all authentication attempts.

Answer analysis

Option-by-option breakdown

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

  • In /etc/rsyslog.conf: *.info /var/log/secure

    Why it's wrong here

    Logs all info messages, not just auth.

  • In /etc/rsyslog.conf: auth.* /var/log/secure

    Why it's wrong here

    auth facility is for non-privileged auth, not the standard for secure log.

  • In /etc/rsyslog.conf: authpriv.* /var/log/secure

    Why this is correct

    Correct facility and action.

  • In /etc/rsyslog.conf: kern.* /var/log/secure

    Why it's wrong here

    Logs kernel messages, not auth.

About these practice questions

One of 979 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.