How to reset the root password

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 

  1. Navigate to your server after logging into your Tilaa account.
  2. Click on the VPS which you want to boot into rescue mode. 
  3. 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: 

mkdir /mnt/linux
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:

passwd root 

4. Type the new password and confirm it, then, exit the chroot by using:

exit 

5. Reboot your system using the reboot command: 

reboot 

Congratulations, you've successfully updated your root password! 

 

Was this article helpful?
5 out of 5 found this helpful

Comments

0 comments

Article is closed for comments.

Articles in this section

See more