Red Hat Certified System Administrator RHCSA · Free Practice Question Hard
Question 3
As a newly appointed System Administrator in a RHEL 9 environment, your primary responsibilities include Network Monitoring, Backup, and Restore. However, you currently do not have access to the root password. Your task is to reset the root password to 'redhat' and ensure you can log in at the default runlevel. Describe the steps you would take to accomplish this.
Show model answer
Reboot the system and interrupt the boot process to access the GRUB menu.
In GRUB, edit the kernel line, adding 'rd.break' at the end to break into emergency mode.
Remount the root filesystem with read-write access: mount -o remount,rw /sysroot.
Chroot into the sysroot: chroot /sysroot.
Reset the root password with passwd and enter 'redhat'.
Update SELinux information: touch /.autorelabel.
Exit chroot and reboot.
Log in with the new root password at the default runlevel.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
