


At this stage, the root file system is mounted in read only mode to /sysroot and must be remounted with read/write (rw) permissions in order for us to actually make any changes.This will boot to the initramfs prompt with a root shell. Press “Ctrl+x” to boot with these options.Enter ‘rd.break’ without quotes at the end of this line, as shown below. From the grub options, find the line that starts with “linux16” and go to the end of it.At the boot menu, press the ‘e’ key to edit the first boot entry. If your Linux system is currently running, reboot it.As with all system maintenance tasks, be sure you have a system backup/snapshot prior to proceeding. This procedure will be completed in the console of the Linux system, so be sure that you have access to this prior to beginning. This is also a task that you will need to know how to perform for the RHCSA exam. From version 7 the equivalent modes are the rescue or emergency targets, however these require the root password before you can do anything which doesn’t help us here, so we’ll take you through the new process to change the lost root password. The process has changed from CentOS/RHEL (Red Hat Enterprise Linux) version 6 to 7, as previously you would boot into single user mode and then change the password as root. Normally resetting the root password is a simple task if you’re logged in already with root privileges, however if you forget the password and need to change it things become a little more difficult.
