How to reset linux root password with SystemRescueCD?

Sometimes we forget root password and needs to reset. One of the approach is to reset via SystemRescueCD.

Switch to root.

su - root

Find out the root logical volume.



In this case, /dev/vg/root is our root logical volume.

Mount the root logical volume

First create an directory to mount to.

mkdir /mnt/root

Mount the logical volume.

mount /dev/vg/root /mnt/root

Change the root directory from SystemRescueCD to the one that just mounted

chroot /mnt/root /bin/bash

Reset root password

passwd root

You will be prompted to enter an new password.



Mike Mai
Mike Mai   Brooklyn, New York
I am full-stack web developer, passionate about building world class web applications. Knowledge in designing, coding, testing, and debugging. I love to solve problems.