Courseiva
Manage security →hardMultiple Choice

EX200 Manage security Practice Question

An administrator needs to grant user 'dev' the ability to execute /usr/local/bin/deploy.sh as root without a password, but no other commands. Which sudoers entry accomplishes this?

⚠ Common exam trap

EX200 often tests whether candidates confuse the PASSWD/NOPASSWD tags, the (root) vs (ALL) runas specification, and the '%' group prefix, any of which changes the meaning of the sudoers rule.

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

✓

dev ALL=(root) NOPASSWD: /usr/local/bin/deploy.sh

The sudoers entry 'dev ALL=(root) NOPASSWD: /usr/local/bin/deploy.sh' grants user dev permission to run only that command as root without a password prompt. The NOPASSWD tag removes the password requirement, and specifying the single command restricts the privilege to exactly that binary.

Answer analysis

Option-by-option breakdown

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

  • ✗

    dev ALL=(root) PASSWD: /usr/local/bin/deploy.sh

    Why it's wrong here

    This sudoers rule requires dev to authenticate with their own password before running /usr/local/bin/deploy.sh as root. Because the stated requirement is a passwordless invocation, PASSWD (or the implicit default of requiring a password) does not satisfy it. The command path and runas user are correctly constrained, but the authentication tag is incorrect.

  • ✓

    dev ALL=(root) NOPASSWD: /usr/local/bin/deploy.sh

    Why this is correct

    This rule correctly grants dev the ability to run /usr/local/bin/deploy.sh with root privileges without entering a password. The NOPASSWD tag overrides the default password requirement, and the fully qualified command path restricts execution to exactly that binary, preventing PATH-based substitution. The (root) runas specification ensures the command runs only as root, matching the requirement precisely.

  • ✗

    dev ALL=(ALL) NOPASSWD: /usr/local/bin/deploy.sh

    Why it's wrong here

    Although this rule includes NOPASSWD and a fully qualified command, the runas list (ALL) allows dev to execute the script as any system user, not just root. This overprovisions the account, as the requirement solely calls for root execution, and could permit unintended privilege escalation or access as other users. A restrictive sudoers entry should name only the necessary target user, here root.

  • ✗

    %dev ALL=(root) NOPASSWD: /usr/local/bin/deploy.sh

    Why it's wrong here

    Using the % prefix designates a user group, not the individual user 'dev'. If a group named dev exists, every member of that group would receive passwordless sudo rights to the command, which is broader and different from the intended single-user grant. Without the %, dev is interpreted as a username, so this entry fails to confer the requested privilege to the correct principal.

About these practice questions

Courseiva writes every EX200 question from scratch — 427 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Red Hat exam blueprint

This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.