LFCS User and Group Management Practice Question
An administrator needs to grant a user named 'john' the ability to switch to any other user without a password. Which TWO of the following steps are required to achieve this?
⚠ Common exam trap
Test-takers frequently confuse the 'wheel' group's traditional role in restricting su access (via pam_wheel.so without 'trust') with granting passwordless su, or they may incorrectly assume that adding a user to the 'root' group or locking the account would enable privilege escalation.
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
✓
Add 'john' to the 'wheel' group and configure /etc/pam.d/su to use pam_wheel.so with the 'trust' option.
Adding 'john' to the 'wheel' group and configuring /etc/pam.d/su with pam_wheel.so and the 'trust' option allows members of the 'wheel' group to switch to any user via su without being prompted for a password. The 'trust' modifier in PAM bypasses the password authentication for users in the specified group, effectively granting passwordless su access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add 'john' to the 'wheel' group and configure /etc/pam.d/su to use pam_wheel.so with the 'trust' option.
Why this is correct
Correct: This allows members of the wheel group to su without a password if pam_wheel.so is configured.
- ✓
Add a sudo rule: 'john ALL=(ALL) NOPASSWD: ALL' to /etc/sudoers.
Why this is correct
Correct: This allows 'john' to run any command as any user without a password via sudo.
- ✗
Set the suid bit on /bin/su.
Why it's wrong here
Incorrect: The suid bit is already set on su; it does not bypass the password prompt.
- ✗
Run 'usermod -L john'.
Why it's wrong here
Incorrect: This locks the account, preventing any login.
- ✗
Add 'john' to the 'root' group.
Why it's wrong here
Incorrect: Being in the root group does not grant passwordless su.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 507-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.