Courseiva

LFCS User and Group Management Practice Question

Arrange the steps to configure a new user account with sudo privileges on a Linux system.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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

✓

Step 1: Create the user account with useradd. Step 2: Set a password with passwd. Step 3: Add the user to the sudo group (e.g., wheel) with usermod -aG. Step 4: Verify sudo access by running a command like 'sudo -l' or 'sudo whoami'.

After creating the user and setting a password, adding to the wheel group grants sudo access. Verification and testing confirm it works.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Step 1: Create the user account with useradd. Step 2: Set a password with passwd. Step 3: Add the user to the sudo group (e.g., wheel) with usermod -aG. Step 4: Verify sudo access by running a command like 'sudo -l' or 'sudo whoami'.

    Why this is correct

    This is the correct order because the user must exist before setting a password, and the user must have a password and be in the sudo group before testing sudo access.

  • ✗

    Step 1: Create the user account. Step 2: Set a password. Step 3: Test sudo access. Step 4: Add the user to the sudo group.

    Why it's wrong here

    This is incorrect because testing sudo access before adding the user to the sudo group will fail, as the user does not yet have sudo privileges.

  • ✗

    Step 1: Create the user account. Step 2: Add the user to the sudo group. Step 3: Test sudo access. Step 4: Set a password.

    Why it's wrong here

    This is incorrect because testing sudo access requires the user to have a password set; otherwise, the test will fail or be insecure.

  • ✗

    Step 1: Add the user to the sudo group. Step 2: Create the user account. Step 3: Set a password. Step 4: Test sudo access.

    Why it's wrong here

    This is incorrect because the user must exist before being added to any group; adding a non-existent user to a group will result in an error.

About these practice questions

This LFCS question is part of Courseiva's 406-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 →

How Courseiva writes practice questions · Editorial policy

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.