Powering The Shell

Unlocking the potential of the shell.


Reset password in RHEL 7

1. Reboot to GRUB and press ‘e’ after highlighting the boot-up entry.
2. Scroll to the line starting with ‘linux16’ and enter the following at the end of the same line:
   

rd.break console=tty1

3. Press Ctrl + x to boot with options specified in step 2.
4. The bootup will lead to a single prompt command line.
5. Enter the following commands to change the pasword:
   

mount -o remount,rw /sysroot

   

chroot /sysroot

   

passwd

-> Enter the password twice.
   

touch / .autorelabel

-> This is to make sure the SELINUX permissions are not disturbed.
   

exit

6. After step 5, the reboot will be complete and now you will be able to login with your new root password.



Leave a comment