Sharing Ilmu

Sharing for useful things

Resetting root password in linux Centos/Redhat

When you using linux redhat or centos operating system and you forgot the user password, you can reset those user password through the root system. But How if you forgot the root password ? the only ways you can reset the root password through emergency mode. In this tutorial I’ll discuss to you about how to resetting the root password if you forgot them.

First, reboot the system and then interupt the boot loader with the press any key for stop countdown at boot loader.  then press for edit the entry.

Append rd.break on the end of line that start with linux as the following images bellow.  after that press ctrl+for exit system.

Give mount access as read/write on /sysroot and then switch to /sysroot access.

Setup the new password for root

do relabel for make sure all files that unlabeled will be relabeled during boot process.

Then, do exit command twice for exit the system and reboot them.

Then test login to root system with new password that are setup before.

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>