How to Recover Root Password of Linux Machine Bypassing

How to recover root, we can change and reset the root password in Linux by interrupting the boot process. This is pretty easy to reset and use the same password again.

How to Recover Root Password of Linux Machine:

Step 1: you have to reboot your machine and before booting Press ‘e’ to interrupt the booting process of your machine.

Check Out: Check Inode Number Of a File Or Directory

Then look for a line Linux 16 and write rd.break between initrd16 and Press Ctrl ‘x’ to execute it.

forgot root password linux

Step 2: Now the system will boot in emergency mode, the next step is to run a command mentioned below.

mount –o remount,rw/ sysroot

This command is used because by default sysroot is in read-only mode.
We changed it to read-write mode.

Check Out: How To Install Memcached Memory Caching In Linux

Step 3: Change the sysroot

chroot /sysroot

change root password

Step 4: Type passwd

It will ask you to change the password after running the above command then change
the root password here.

linux change root password

Check Out: How To Disable Selinux On CentOS7

Step 5: This command will disable the SELinux so

Type getenforce 0

Step 6. After all, the Last Step is to load the changes to SELinux using the command touch /.autorelabel

Press “exit”. so

Step 6: You will have to exit two times then the system will reboot, try to login with your new password enjoy. so

YouTube Link: Crack Root Password

You’re done. linux change root password

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment