Hello guys,

Simply step by step HOWTO : reset root pass 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 ;

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

Code: 
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

/mnt is just a temporary mounting location.

Then you will have to chroot, this is done by ;

Code: 
chroot /mnt /bin/bash
or

Code: 
chroot /mnt /bin/sh
Then issue the following command to reset your REAL ROOT password

Code: 
passwd root
and reset it.

Then type the following to exit chroot;

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

Code: 
umount /mnt
And finally reboot the server;

Code: 
reboot

That's about it really. Nothing hard

If you have any comments or easier methods, please do let me know and I will edit this

regards,
Ryan
vps9Ryan Reviewed by vps9Ryan on . [HOWTO] Reset Root Password via Rescue Mode Hello guys, Simply step by step HOWTO : reset root pass 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 ; Rating: 5