Saturday, September 28, 2013

Reset Root Password via Rescue Mode

Make sure you are on the rescue mode, or atleast requested rescue mode from your DC or dedi reseller.

1) Login to the SSH console (rescue mode)

Issue the following command ;

fdisk -l

Then find the disk partition (you will know it by the amount of HD, quite straight forward), then mount using

mount /dev/xvda1 /mnt

/dev/xvda1 will be shown when you type fdisk -l

NOTE : it will not always be /dev/xvda1 - so make sure to choose the right one when you go for the fdisk -l

sometimes chroot /mnt may bot work due to your partition schema or just could not find zch or bash and in such case you could run

chroot /mnt /bin/bash

 Then issue the following command to reset your REAL ROOT password

passwd root

and reset it.

Then type the following to exit chroot;


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

umount /mnt

And finally reboot the server;


No comments:

Post a Comment