Change Root Password - Rescue Mode - VPS - Dedicated Servers
change the VPS or dedicated server root password via rescue mode, you have to reboot your vps/server in rescue mode. to do this please follow the instructions below.
Go to your client area > services > [your vps / dedicated server]
Then click to your related product / service. When your product form open. scroll down to see “Tabs”
Here Please click on “Power” Then on “Net boot” then on “Rescue”
Here in left side image, you can see tabs, and in these tabs you can see Power tab is highlighted and you can see the Option “Net Boot” and also “Rescue” button.
You can see “Available Options” in image footer, Select “Rescue64 pro” and then press “Boot Now”.
right side image you can see a pop up asking for reboot confirmation. Please select yes to reboot your server / vps in rescue mode.
Note: After rescue operation, you can reboot your server in normal mode again from same screen by selecting “Hard Disk” button instead of “Rescue“.
Note: You can also boot your server from “Network” by providing your own details.
For VPS / Cloud VPS
After this you will receive an email having credentials to access your server /vps. So when you receive these details, please access your server / vps in rescue mode via ssh and then follow the instructions below.
Using received details you are able to connect to your server, but your files are still not accessible. You need to mount them to your file system.Note
On a Cloud VPS, before going any further, you have to mount your partition by launching the following command:
[root@rescue ~]# mount /dev/vda1 /mnt
Now launch following command to go to your directory.
[root@rescue~]# cd /mnt
Then chroot your disk / partition by launching following command.
[root@rescue~]# chroot /mnt
For Dedicated Server
Usually, /dev/xda1 is the root partition (/), and /dev/xda2 is /home. Replace x in xda1 and xda2 by the correct letter for your drive (s,h,…).
You could also use devfs nomenclature.
If you do not know what type of disks you have on your machine, nor what are their partition table, you can use the fdisk command. Here is an example of an output:
rescue:~# fdisk -l
mount the root partition (/), simply execute the mount command followed by the partitions where it is located (/dev/hda1) and the place where you wish to mount it (/mnt).
rescue:~# mount /dev/hda1 /mnt/
Then, do a chroot on the mount made:
rescue:~# chroot /mnt/
After mounting your partition in VPS / Dedicated Server
Now you had mounted your partition and chroot it in your VPS / Dedicated server.
It is time to change root password. Simply lanuch the following command in terminal.
rescue:~ passwd root
It will ask you for password. Give it your new password twice.