XK0-006 Security Practice Question
An administrator wants to allow user 'jane' to run all commands as root via sudo without a password. Which line should be added to /etc/sudoers?
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
✓
jane ALL=(ALL) NOPASSWD: ALL
The format is 'username ALL=(ALL) NOPASSWD: ALL'. The other options either require a password, use incorrect syntax, or include unnecessary aliases.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
jane ALL=NOPASSWD: ALL
Why it's wrong here
Missing (ALL) after equals sign; incorrect syntax.
- ✗
jane ALL=(root) NOPASSWD: ALL
Why it's wrong here
Restricts to root only, but still functional; however, the standard is (ALL).
- ✗
jane ALL=(ALL) ALL
Why it's wrong here
Requires password, not NOPASSWD.
- ✓
jane ALL=(ALL) NOPASSWD: ALL
Why this is correct
Correct syntax for passwordless sudo.
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
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.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 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 →
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.