It can happen quickly. You try to log in to your Linux server, but your password is no longer accepted or you’ve forgotten it. This means you can’t access the system, important data, or services. That can be frustrating, especially when the server is needed for ongoing operations. You can usually restore access without reinstalling the system by using Rescue Mode in your ZapX dashboard. Just follow the steps below to regain access to your server and get back to work with minimal disruption.
In the Rescue tab of your VPS management page, open the Rescue Mode card and click Start Rescue Mode. The server will restart once from a rescue environment (usually SystemRescue) instead of booting from your own disk.
Once the status changes to Active, click Switch to Console (or open the Console tab directly) to connect to the rescue environment.
First, find out the name of your partition in the rescue environment:
lsblk
Mount the partition where your system is installed with write permissions (the device name depends on your server, e.g. /dev/sda1 or /dev/vda1):
mount /dev/sdaX /mnt
Use chroot to switch to your installed system so that the following commands run in the context of your actual installation:
chroot /mnt
If you don’t know the username, you can list all available user accounts by checking the home directories:
ls /home
To reset the password, use the passwd command followed by the username:
passwd username
Replace username with the actual account name. Enter the new password and confirm it when prompted. Your password won’t be displayed on the screen as you type.
Then exit the chroot environment and unmount the partition:
exit
umount /mnt
Go back to the Rescue tab and click Exit Rescue Mode. The server will then restart normally from your own disk.
