RHCSA 9 Exam Practice Question 1 (Recovering Root Password In Linux)

What Should I know About The RHCSA Exam

EX200/RHCSA 9 Exam Practice Question 1

Question

The system administrator has just just been laid off, as the new system administrator, reset the root password of the HQDEV1 server to Password123

The question is based On resetting/recovering the root password in the RHCSA Course on this website. If you have gone through this course, solving this wouldn’t be a problem.

RHCSA Course

Four different methods to reset root password in Linux

Ask Your Questions

RHCSA 9 Exam Practice Questions & Answers Collection

Answer

There are different methods to solve this. During the course of the study, we saw four different methods which are

Method 1

Method 2

Method 3

Method 4

You can use any of the methods that you are most comfortable with. I will be using method 3

1. restart the server, interrupt the boot process and edit the kernel line by pressing the “e” key on your keyboard.

2. Edit the line that starts with Linux, at the end of the line, enter “init=/bin/bash” just as highlighted in yellow in the image below.

EX200/RHCSA 9 exam practice question 1

3. press ctrl+x so that the system can be booted into single user mode

4. remount the root file system as rw

# mount -o remount,rw /

5. change the root password to “Password123”

# passwd root

6. relabel SELinux context.

# touch /.autorelabel

7. Reboot the system and login with the new password

# exec /sbin/init

NB: You can also enter the command, “exit” twice to reboot instead of using the exec command.

Solution Summary

init=/bin/bash

ctrl+x

mount -o remount,rw /

passwd root

touch /.autorelabel

exec /sbin/init

You can also watch the Video on EX200/RHCSA 9 Exam Practice Question 1 by clicking the link below.

Click To Watch Video On EX200/RHCSA 9 Exam Practice Question 1

Your feedback is welcomed. If you love others, you will share with others

4 Comments

Leave a Reply

Your email address will not be published.


*