Tuesday, July 19, 2016

RedHat/CentOS7 root password reseting trick

Dam simple method to reset RedHat ,centOS7 root password

I know their are many methods, but this one worked for me in my CentOS7


Append “rd.break” to the kernel command line that starts with linux16 (this will break just before control is handed from the initramfs to the actual system) (sometimes it is needed to delete also everything after “…mapper/rhel-root ro” and append here)

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


#touch /.autorelabel
exit” and again “exit” and you are done.

About Author

Milan Techglyphs
Milan Techglyphs

Author & Editor

Milan Antony is the founder of TGS.He is a Technology Enthusiast with a keen eye on the Cyberspace and other tech related developments.


Post a Comment