Courseiva
Security →mediumMultiple Choice

XK0-006 Security Practice Question

A system administrator needs to configure sudo so that members of the 'wheel' group can execute any command without a password. Which line should be added to /etc/sudoers (using visudo)?

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

✓

%wheel ALL=(ALL) NOPASSWD: ALL

To allow wheel group to run all commands without a password, the line should be '%wheel ALL=(ALL) NOPASSWD: ALL'.

Answer analysis

Option-by-option breakdown

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

  • ✗

    %wheel ALL=(ALL) ALL

    Why it's wrong here

    This grants wheel members full command rights but still prompts for their own password, because no NOPASSWD tag is present. It is tempting as the conventional sudoers group entry and would be correct where password confirmation is required; the scenario explicitly demands passwordless execution, which only the NOPASSWD tag supplies.

  • ✗

    wheel ALL=(ALL) NOPASSWD: ALL

    Why it's wrong here

    Without the % prefix, sudoers treats 'wheel' as a username rather than a group, so no wheel member matches the rule. It is tempting because the NOPASSWD and command specifications are otherwise identical to the correct entry; it would be correct only if a local user literally named wheel existed.

  • ✓

    %wheel ALL=(ALL) NOPASSWD: ALL

    Why this is correct

    The %wheel prefix denotes a group entry, ALL=(ALL) grants every command as any user, and NOPASSWD: ALL removes the password prompt. This line satisfies the requirement that wheel members run any command without a password.

  • ✗

    %wheel ALL=NOPASSWD: ALL

    Why it's wrong here

    Missing (ALL) runas specification.

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.