Question 213 of 511
System SecurityhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the first rule logs only failed openat calls, and the second rule logs all connect syscalls. This is because the first rule applies the `-F exit=-EACCES` filter, which specifically matches `openat` syscalls that return the EACCES permission error, effectively logging only failed file-open attempts. The second rule uses `-S connect` without any exit status filter, so it captures every `connect` syscall—successful or failed—for outbound connection monitoring. On the LPIC-2 exam, this tests your understanding of how `auditctl` rule filters control syscall logging granularity, a common topic in the system auditing objective. A frequent trap is assuming that omitting an exit filter means no logging, when in fact it logs all calls. Remember the mnemonic: “No exit filter means all entries are delivered.”

LPIC-2 System Security Practice Question

This LPIC-2 practice question tests your understanding of system security. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

```
# auditctl -l
-a always,exit -F arch=b64 -S openat -F success=0 -F key=access_denied
-a always,exit -F arch=b64 -S connect -F key=outbound_connect
-w /etc/shadow -p wa -k shadow_changes
-w /etc/ssh/sshd_config -p wa -k sshd_config_change
```

An administrator is reviewing the audit rules on a Linux server. The current rules are shown in the exhibit. The administrator needs to ensure that any failed attempts to open files are logged, while also monitoring for successful outbound connections. Which of the following describes the effect of the current rules?

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
# auditctl -l
-a always,exit -F arch=b64 -S openat -F success=0 -F key=access_denied
-a always,exit -F arch=b64 -S connect -F key=outbound_connect
-w /etc/shadow -p wa -k shadow_changes
-w /etc/ssh/sshd_config -p wa -k sshd_config_change
```

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

The first rule logs only failed openat calls, and the second rule logs all connect calls.

The first rule uses the `-F exit=-EACCES` filter, which matches only failed `openat` calls (those returning the EACCES error). The second rule uses `-S connect` without an exit filter, so it logs all `connect` syscalls regardless of success or failure. Therefore, option A correctly describes the effect: failed openat calls and all connect calls are logged.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • The first rule logs only failed openat calls, and the second rule logs all connect calls.

    Why this is correct

    The first rule logs failed openat (success=0), the second logs all connect (no success filter).

    Related concept

    Read the scenario before looking for a memorised answer.

  • The first rule logs only successful openat calls, and the second rule logs only failed connect calls.

    Why it's wrong here

    The first rule uses success=0, which means failed calls; the second rule does not filter by success, so it logs both.

  • The first rule logs all openat calls, and the second rule logs all connect calls.

    Why it's wrong here

    The first rule logs only failed openat calls because of success=0.

  • The first rule logs only failed openat calls, and the second rule logs only failed connect calls.

    Why it's wrong here

    The second rule does not filter by success, so it logs all connect calls.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume `-S connect` without an exit filter only logs failed connections, but it actually logs all connect syscalls, and they may also overlook that `-F exit=-EACCES` explicitly targets failures, not successes.

Detailed technical explanation

How to think about this question

In auditd, the `-F exit=-EACCES` filter captures syscalls that return the EACCES error code (Permission denied), which is a common failure mode for file open operations. The `-S connect` rule without an exit filter matches every invocation of the `connect` syscall, including both successful and failed connection attempts. This distinction is critical for security monitoring: failed opens may indicate unauthorized access attempts, while all outbound connections (successful or not) can help detect data exfiltration or C2 traffic.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related LPIC-2 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LPIC-2 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LPIC-2 question test?

System Security — This question tests System Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The first rule logs only failed openat calls, and the second rule logs all connect calls. — The first rule uses the `-F exit=-EACCES` filter, which matches only failed `openat` calls (those returning the EACCES error). The second rule uses `-S connect` without an exit filter, so it logs all `connect` syscalls regardless of success or failure. Therefore, option A correctly describes the effect: failed openat calls and all connect calls are logged.

What should I do if I get this LPIC-2 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.