Skip to content

Dedicated Server: Restore Access

Learn how to regain access to your Linux Dedicated Server after a password lockout and minimize downtime → Find out more now

12 November 20262 min read54 Views0 helpful

Introduction

This can happen quickly. You try to log into your Linux server, but the password is no longer accepted or has been forgotten. This means you can no longer access the system and important data or services. It can be really frustrating, especially if the server is needed for ongoing operations. For most Linux distributions, access can be restored via recovery mode without needing to reinstall the operating system. With the following steps, you can make your server accessible again and continue working with minimal interruptions.

Restoring Access

To reset the password in recovery mode, the system must be started with access to the GRUB boot menu. You can reach your server’s boot console remotely via the Remote Management tab in your ZapX customer account (this replaces the previous separate iLO/IPMI login). Use this to open the GRUB menu during system startup and select Advanced options for Ubuntu.

In the next screen, select the entry that starts the system in Recovery Mode. This loads the recovery environment instead of the normal operating system.

Once the recovery menu appears, choose root – Drop to root shell prompt and confirm the selection. Press Enter again to open the root shell.

In recovery mode, the root filesystem is mounted as read-only by default. To change the password, it must be remounted with write permissions. Run the following command:

bash
mount -o remount,rw /

If you don’t know the username, you can list all available user accounts by checking the home directories:

Code
ls /home

To reset the password, use the passwd command followed by the username:

Code
passwd username

Replace username with the actual account name. Enter the new password and confirm it when prompted. The password input will not be displayed on the screen. Once the password has been successfully changed, reboot the system with the command reboot.

Conclusion

After completing these steps, you should have successfully set a new password for the desired user. You can now log in again via SSH. If you have any further questions or need assistance, our support team is available daily to help! 🙂

FAQ

Frequently asked questions

During system startup, open the GRUB menu via the Remote Management tab in your ZapX account, select Advanced options for Ubuntu, and start the system in recovery mode.
In the recovery menu, select root – Drop to root shell prompt, remount the root filesystem as writable with mount -o remount,rw /, then reset the password using the passwd command.
List available user accounts by checking the home directories with the command ls /home.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.