Have you forgot your root password? Or did someone try to "hack" your server? In this tutorial we will show how you can reset your root password.

First, login to OVH Manager control panel: you received the login details when you first signed up with us, please check your email folder.


Select your dedicated server from the list then > Services > Netboot > Select the dropdown menu to "rescue-pro" and fill in your email address > Click Validate.





Then, go to Services > Reboot > reboot, wait for around 10 minutes you receive "new" SSH password (keep in mind this for rescue mode, not your server).





Login with SSH/Putty with your new login credentials and follow these steps (read this very carefully) :


1. Check your dev root partition :
- fdisk -l
- mount
- cat /proc/partitions


For Hardware raid or non-raid partition the dev root should start with "sda" and for Software raid the name should be start with "md".


2. Mount the dev root partition. In this example we will use /dev/md2 for the root partition, but this depends on your system setup.
In most cases it's /dev/sda1 or /dev/md1 if /boot partition is not separated:


2a. Hardware raid or non-raid :
- mount /dev/sda2 /mnt/


2b. Software raid :
- mount /dev/md2 /mnt/



3. Change the system root and change root password:
- chroot /mnt/
- passwd root
- (insert new root password twice)








4. Go back to Manager control panel > Services > Netboot > set the dropdown menu back to "hd".







5. Go to Services > Reboot > reboot





Cross your finger and wait for around 10 minutes
You may now try the new root password.