Courseiva
easyMultiple ChoiceObjective-mapped

XK0-006 Practice Question: Allow a user to run all commands as root without…

An administrator needs to allow a user to run all commands as root without a password. Which sudoers entry accomplishes this?

⚠ Common exam trap

Many candidates confuse the default behavior of `ALL` (which still requires a password) with the `NOPASSWD` tag, leading them to select option D thinking it allows passwordless execution.

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

user ALL=(ALL) NOPASSWD: ALL

The sudoers entry `user ALL=(ALL) NOPASSWD: ALL` grants the user permission to run any command as any user (including root) without being prompted for a password. The `NOPASSWD` tag overrides the default password requirement, and the `ALL` specifications cover the host list, target user list, and command list.

Answer analysis

Option-by-option breakdown

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

  • user ALL=(ALL) NOPASSWD: ALL

    Why this is correct

    This entry allows passwordless execution of all commands.

  • user ALL=(ALL) !ALL

    Why it's wrong here

    This entry denies all commands.

  • user ALL=(ALL) PASSWD: ALL

    Why it's wrong here

    This is not a valid sudoers syntax.

  • user ALL=(ALL) ALL

    Why it's wrong here

    This entry requires a password to execute commands.

About these practice questions

This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.