If a regular user forgets his or her password, a superuser can reset it directly from the terminal. But, what if the superuser (or root user) forgets his or her password? The following article will walk you through the process of resetting your root password via rescue mode.
Activate the rescue mode on your server
- Navigate to your server after logging into your Tilaa account.
- Click on the VPS which you want to boot into rescue mode.
- Under task, click Start in rescue mode.
For more information about the rescue mode, please visit this article.
Change root password in rescue mode
Perform the following instructions after logging into your server in rescue mode through ssh or video display:
1. mount the system disk by typing:
mount /dev/vda1 /mnt/linux
2. Change the running root by using the chroot command to allow you to change your password:
chroot /mnt/linux /bin/bash
3. Changing the running root allows you to change the root password by using:
4. Type the new password and confirm it, then, exit the chroot by using:
5. Reboot your system using the reboot command:
Congratulations, you've successfully updated your root password!