XK0-006 Security Practice Question
An administrator is configuring sudo access for a group of developers. They should be able to run any command as root, but only after authenticating with their own password. Which TWO configuration lines in /etc/sudoers would achieve this? (Select TWO.)
⚠ Common exam trap
Candidates often confuse the default behavior of sudo (which requires a password) with the explicit `PASSWD` tag, and may incorrectly select `NOPASSWD` options or miss that `PASSWD: ALL` is needed to override potential global `!authenticate` settings or to make the requirement explicit.
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
✓
%developers ALL=(ALL) ALL
The syntax `%developers ALL=(ALL) ALL` grants members of the `developers` group permission to run any command as any user (including root) on any host, and by default sudo requires the user's own password for authentication. Option E is also correct because `PASSWD: ALL` explicitly enforces password authentication for all commands, overriding any global `!authenticate` or `NOPASSWD` settings. Together, these two lines ensure the developers must authenticate with their own password before executing commands as root.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Defaults:%developers !authenticate
Why it's wrong here
Disables authentication for the group, not desired.
- ✗
root ALL=(ALL) ALL
Why it's wrong here
This is for root user, not developers group.
- ✗
%developers ALL=(ALL) NOPASSWD: ALL
Why it's wrong here
NOPASSWD skips password, not desired.
- ✓
%developers ALL=(ALL) ALL
Why this is correct
Gives developers full sudo access with password prompt (default).
- ✓
%developers ALL=(ALL) PASSWD: ALL
Why this is correct
Explicitly requires password; same as default but explicit.
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
sudo
sudo is a command-line utility in Unix-like operating systems that allows a permitted user to execute a program as another user, typically the superuser (root), based on security policy settings.
Key term
passwd
passwd is a command-line utility used on Linux and Unix-like systems to change a user's password, typically stored in an encrypted format in the /etc/shadow file.
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 →
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.