Skip to main content

Posts

How To Reset root pass in RHEL 7 & CentOS 7

        Hi every one in this post i will show you, how to reset  forgot root password in RHEL_7 & CentOS_7 . Short record of the prosses i will post later.     In previous post i used "init=/bin/sh" for resetting but now i will show another way of resetting root pass. Let's begin      First in grub loader menu tab  'e'  enter edit boot options from here go to line beginig with 'linux16' in this line delete words 'rhgb', 'quite' and add  'rd.break' press 'Ctrl+x'  and we boot in emergency mode where system mount to "sysroot" . Enter below commands: mount -o remount,rw /sysroot       #remount as read write /sysroot chroot /sysroot      #change root folder to sysroot passwd   #for resetting root password touch /.autorelabel         #for selinux   exit    #twice enter exit   ...

Resetting the root password on RHEL 7 Systems

How to Reset Root Passwords on RHEL 7 and CentOS 7 Linux Systems If you have forgotten your root password on a RHEL 7 server or a CentOS 7 server, you can reset your root password as long as you have access to the GRUB 2 bootloader. (The following example was performed on a RHEL 7.5 server) To access the GRUB 2 bootloader, boot your system and wait for the GRUB 2 menu to appear: Boot System and wait for GRUB 2 menu Boot your system and wait until the GRUB2 menu appears. On some systems you may need to press the "Escape" key to access the GRUB 2 menu. Highlight OS Entry Highlight your Operating System and then press " e " to edit. Find line beginning linux Find the line beginning with linux . In this example the line begins linux16 . Manually Edit Line Using the arrow keys and the delete key, manually delete the following entries rhgb and quiet from the line. Next, append the following statement to the end of the line init=/bin...