Courseiva
GNU and Unix CommandsmediumDrag & DropObjective-mapped

LPIC-1 GNU and Unix Commands Practice Question

Order the steps to recover a forgotten root password on a Linux system.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

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

1. Reboot the system. 2. Interrupt the GRUB bootloader. 3. Add 'init=/bin/bash' to the kernel command line. 4. Boot the system. 5. Remount the root filesystem as read-write. 6. Change the root password using passwd. 7. Reboot the system.

Recovery involves booting into a shell with root access, remounting read-write, and changing the password.

Answer analysis

Option-by-option breakdown

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

  • 1. Reboot the system. 2. Interrupt the GRUB bootloader. 3. Add 'init=/bin/bash' to the kernel command line. 4. Boot the system. 5. Remount the root filesystem as read-write. 6. Change the root password using passwd. 7. Reboot the system.

    Why this is correct

    This is the correct order. Interrupting boot allows adding init=/bin/bash to get a root shell. Remounting root as rw is necessary because the root filesystem is mounted read-only by default in this recovery mode. Then passwd can write the new password.

  • 1. Reboot the system. 2. Interrupt the GRUB bootloader. 3. Add 'init=/bin/bash' to the kernel command line. 4. Boot the system. 5. Change the root password using passwd. 6. Remount the root filesystem as read-write. 7. Reboot the system.

    Why it's wrong here

    This order is incorrect because the root filesystem is mounted read-only. Running passwd before remounting read-write will fail or not actually change the password, as the changes cannot be written.

  • 1. Reboot the system. 2. Boot into single-user mode from GRUB. 3. Remount the root filesystem as read-write. 4. Change the root password using passwd. 5. Reboot the system.

    Why it's wrong here

    This order is incomplete and incorrect. Booting into single-user mode does not automatically provide a root shell with a writable filesystem; the 'init=/bin/bash' method is more direct. Also, steps are missing the GRUB interruption and editing.

  • 1. Reboot the system. 2. Edit GRUB to add 'single' to the kernel line. 3. Boot the system. 4. Remount the root filesystem as read-write. 5. Change the root password using passwd. 6. Reboot the system.

    Why it's wrong here

    This order is incorrect because using 'single' instead of 'init=/bin/bash' may not provide a proper root shell with all necessary permissions. The remount step is correct in sequence, but the boot parameter is wrong.

About these practice questions

This LPIC-1 question is part of Courseiva's 527-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 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.