Question 13
Perform following task on "node02"
Interrupt the boot process and reset the root password. Change it to "welcome#" to gain access to the system
Solution 13 (Tested on RHEL 9.0 and RHEL 8.6)
-- The first step is to boot into RHEL 9.
-- Once the GRUB menu comes into view,
-- press 'e' on the first boot entry to interrupt the boot process.
-- Then you will be granted access to the kernel boot parameters.
-- From here, you need to access "rescue mode." To achieve this,
-- locate the line that starts with "linux"
-- and navigate to the end. Next, include a space and append the following directive
rw init=/bin/bash
-- This option mounts the root filesystem in "read-and-write" mode
-- so that you can make the necessary changes to repair the system or reset a password.
-- Next, press
ctrl + x
-- Once you have accessed rescue mode
-- change the root password by running the command:
passwd
-- for selinux relabeling issue the following command
touch /.autorelabel
-- Finally, reboot your system using either of the following commands
-- (note, the shutdown command will capture a log of the action taken here):
/sbin/reboot -f
-- The system will restart and the SELinux autorelabeling process will commence
-- Once the autorelabeling process is complete, the system will reboot once more,
-- and this time around, let it boot uninterrupted.
-- On the login prompt, provide your new root password in order to login.
-- You can confirm that you are logged in as the root user as shown.
whoami
Thank you.
Enjoy !!
15 авг 2023