GIAC Security Essentials Certification (GSEC) — Question 37
You work as a Linux technician for Tech Perfect Inc. You have lost the password of the root. You want to provide a new password. Which of the following steps will you take to accomplish the task?
Answer options
- A. The password of the root user cannot be changed.
- B. Use the PASSWD root command. Reboot the computer.
- C. Reboot the computer in run level 0. Use INIT=/bin/sh as a boot option. At the bash# prompt, run the PASSWD root command.
- D. Reboot the computer in run level 1. Use INIT=/bin/sh as a boot option.
Correct answer: D
Explanation
The correct answer is D, as rebooting in run level 1 allows access to a single-user mode where you can reset the root password safely. Option A is incorrect because the root password can indeed be changed. Option B is also wrong because you cannot change the password without first booting into a mode that allows root access. Option C is not suitable because run level 0 is for system halt, not for password recovery.