March 16, 2018 · CentOS Linux Tutorial

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.

lvdisplay

lvdisplay

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.

Reboot

exit
reboot



Comments powered by Disqus