RECOVERING ROOT PASSWORD IN LINUX



To Recover the root password in Redhat7, You can follow below steps to recover it.

1. Restart the system
2. Interrupt the boot loader countdown by pressing esc key and press E

3. Move the cursor to the linux16 entry line that needs to be booted, by pressing end key move the   cursor to end of line 
                                                    rd.break
                                                    ctrl + X 
4. Remount the /sysroot
                                                 mount -oremount,rw /sysroot
                                                 chroot /sysroot

 
5. Change the root password
                                              passwd root

6. Unlabel the file in /etc/shadow
                                            touch /.autorelabel 
 7. Restart the system
     


Previous
Next Post »