
Resetting your root password is essential when you lose administrative access to your server due to forgotten credentials or misconfiguration. Using the SystemRescue ISO available in the Vultr Console, you can regain access without reinstalling the operating system or losing data.
This guide outlines how to reset the root or administrator password on a Vultr Cloud Compute instance across multiple operating systems, including Linux distributions, FreeBSD, OpenBSD, and Windows Server, without reinstalling the system or affecting existing data.
Before performing any of the steps below, take a snapshot of your instance to avoid potential data loss or application disruption.
The SystemRescue ISO provides a minimal rescue environment that operates independently of the installed OS. Mounting the root partition and using chroot allows the root password to be reset without reinstalling the system.
Log in to the Vultr Console.
Navigate to Instances under Compute.
Select the instance for which you want to reset the root password.
Click Settings, then select Custom ISO.
Under the ISO Library, choose the SystemRescue ISO image and click Attach ISO and Reboot
Open the web console by clicking the View Console icon on the instance information page.
In the console, press Enter to boot using the default SystemRescue kernel.
After the instance boots, you see a prompt like below.
This confirms that the system is running in SystemRescue mode.
List the attached block devices.
Output:
Mount the root block device.
This command mounts the root partition at /mnt. Replace /dev/vda2 with your actual root partition.
Chroot into the mounted system.
This command switches the shell's root directory to the mounted system under /mnt, allowing you to operate as if you're inside the original system. It enables you to run commands like passwd to modify the root user's password in the correct environment.
Reset the root password.
When prompted, enter a new strong password twice to confirm. This updates the root user's credentials on the mounted system, restoring administrative access after reboot.
Exit the chroot environment.
Reboot the instance.
After the reboot, return to the Custom ISO section under Settings.
Click Remove ISO to detach the rescue ISO and boot the server using root block device.
You have successfully reset the root or administrator password on your server using SystemRescue ISO or Single User Mode. Whether on Linux, BSD, or Windows, you restored administrative access without reinstalling the operating system or losing data. By following each platform-specific procedure, you ensured secure access to your Vultr instance and maintained system integrity.
0 Comments
Be the first to comment and share your perspective with the community.