reset root password via rescue mode

[Total: 4    Average: 5/5]

In this article, we are going to reset root password via rescue mode.

boot the server in rescue mode and run the below command.

fdisk -l

Then find the disk partition and mount it

mount /dev/xvda1 /mnt

/dev/xvda1 will be shown when you type fdisk -l
/mnt is just a temporary mounting location

chroot /mnt /bin/bash

Then run the below command to reset your REAL ROOT password

passwd root

and reset it.

exit

Then you will have to unmount the temporary partition using the following command;

umount /mnt

And finally reboot the server;

reboot