For Linux VPS and migrated Cloud Servers with Debian 11, Debian 12, Ubuntu 22.04, and Ubuntu 24.04, managed in Cloud Panel.
Introduction
This guide explains how to reset the root password for a VPS or migrated cloud server running Debian or Ubuntu.
Caution: Improper execution of these steps could lead to data loss. Always ensure a backup is created before starting the process.
Prerequisites
- Server State: Ensure the server is switched on.
- Backup: A current backup of the server must be created.
Step 1: Load the Rescue System
- Go to Infrastructure > Server.
- Click the DVD drive and activate the latest GParted ISO.
- Click Load DVD and confirm with Yes.
Activate GParted ISO
Restart and Boot into Rescue System
- After the server restarts, select Actions > Open remote console.
- In the boot menu, choose GParted Live (Default Settings).

- Follow the prompts to:
- Select a policy and confirm with OK.

- Choose a language (default: 33 for English).

- Enter the start method (default: 0).

Step 2: Change the Root Password
Access Terminal
- Close the GParted window (black rectangle).

- Open the Terminal program.

-
Switch to Root User
user@debian:$ sudo su
Identify the Root File System
- Use
lsblk
to display the disk layout:user@debian:$ lsblk
- Identify the largest partition (e.g.,
/dev/vda1
).
[Insert image: lsblk output with root partition highlighted]
Mount the Root File System
Change Directory to Root File System
root@debian:/home/user# chroot /mnt
Reset the Password
[Insert image: Successful password reset command]
Sync Changes and Unmount
[Insert image: Unmount confirmation in terminal]
Step 3: Restart the Server
Eject the DVD
- Return to the Cloud Panel.
- In Infrastructure > Server, eject the GParted ISO and confirm with Yes.
[Insert image: Ejecting DVD process]
Restart the Server
Note: The server will restart, and the DVD will be ejected automatically.
[Insert image: Server restart process in Cloud Panel]
By following these steps, you can successfully reset the root password on your VPS or migrated cloud server.