Drag steps to the numbered slots on the right, or tap a step then tap a slot.
LPIC-1 Shells, Scripting and Data Management Practice Question
Order the steps to add a new user to the system and grant sudo privileges.
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
Create the user account using useradd, set the password using passwd, then add the user to the sudo group using usermod -aG sudo
User creation uses useradd, then password is set, and adding to sudo group grants privileges.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create the user account using useradd, set the password using passwd, then add the user to the sudo group using usermod -aG sudo
Why this is correct
This is the correct order because the user must exist first (useradd), then a secure password is set (passwd), and finally sudo privileges are granted by adding the user to the sudo group (usermod -aG sudo).
- ✗
Create the user account using useradd, add the user to the sudo group using usermod -aG sudo, then set the password using passwd
Why it's wrong here
This is incorrect because while it is possible to add a user to a group without a password, it is conventional and more secure to set the password before granting sudo privileges to ensure the user can authenticate immediately. Also, some systems may require password to be set before first sudo attempt.
- ✗
Set the password using passwd, create the user account using useradd, then add the user to the sudo group using usermod -aG sudo
Why it's wrong here
This is incorrect because the user does not yet exist when trying to set the password (passwd requires an existing user). The user must be created first.
- ✗
Set the password using passwd, add the user to the sudo group using usermod -aG sudo, then create the user account using useradd
Why it's wrong here
This is incorrect because both setting the password and modifying group membership require an existing user. Creating the user last makes the first two steps fail.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 527 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 →
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.