How to Reset root password Redhat-7

Restart your linux machine and pause it on grub screen by using up/down arrow keys 











Now press “e” on kernel boot line .

Go at the end of  “linux16” line .











And add “console=tty1 rd.break”  at end of the line and press Ctrl+x for boot .

Note : don’t confuse with  “\”  it automatically add for continue the word  while end the line you have to just enter console=tty1 rd.break   and Ctrl+x  .











It will drop you in terminal here run below command .










#mount –o remount,rw /sysroot              ( mount the root filesystem with read,Write permission )

 #chroot /sysroot                                              (for access root shell )

#passwd                                                              (for change root password )

#touch /.autorelabel                                     ( for auto restored SeLinux Context  to default will not effect by our modifications  )




Now you can login with new password .


Leave a Reply

Your email address will not be published. Required fields are marked *