How to Reset Forgotten Root Password in RHEL 8




Step-1:) First, boot into your RHEL 8 system and select the kernel you wish to boot into. Next, interrupt the booting process by pressing ‘e’ on your keyboard. 



Step-2:) On the next screen, locate that begins with linux and append the parameter rd.break and press Ctrl + x


Step-3:)  On the next screen, ensure that you remount the sysroot directory with read and write permissions. By default, it is mounted with read-only access rights indicated as ro. You can confirm this by running the command:

            :/# mount | grep sysroot


Step-4:) Now remount the directory with read and write access.

            :/# mount -o remount,rw /sysroot/


Note:- "Next, run the command shown to mount the root file system in read and write mode."
                    
                    :/# chroot /sysroot


Step-5:) At this moment you have successfully reset your password. The only part remaining is to enable file system relabelling. To do this execute:

                    :/# touch /.autorelabel


Step-6:) Finally, type exit and then log out to begin the relabelling process.







No comments:

Post a Comment

Computer Hardware_(A+) & Operating System with Networking

Microprocessor Motherboard About Operating System Create Bootable Pen Drive via Command Map Network Drive File Transfer Protocol in Windows ...