This guide explains how to reset your user account password if you have lost access to your server.
Without a different mode of authentication or another user account, losing your password means you can no longer log in to your server in a regular way.
In this case, you can connect to your server via the OVHcloud rescue mode, which allows you to log in with a provisional password and modify your files.
To recover access to a server that you log in to with an SSH key, refer to our guide on How to replace an SSH key pair instead.
Requirements
- A dedicated server or a VPS with a Linux-based OS in your OVHcloud account
- Access to the OVHcloud Control Panel
This guide does not apply to Windows server installations. Please refer to our guides on How to change the admin password on a Windows dedicated server and How to change the admin password on a Windows VPS.
Instructions
Be sure to consult our "Getting started" guides as well:
- For a dedicated server
- For a dedicated server of the Eco product line
- For a VPS
This tutorial is designed to help you as much as possible with common tasks. If you are having difficulty performing these actions, please contact a specialized service provider. OVHcloud can't provide you with technical support in this regard.
Step 1: Restart the server into rescue mode
Use the corresponding rescue mode guide to connect to your server and mount your partitions:
To proceed, your system partition must be mounted and you must have write access to your file system.
This means that you have entered a version of the following command into the rescue mode shell:
The exact command depends on the mountpoint you used. For example, if you have mounted your partition at /mnt
, it would be the following:
Step 2: Reset the user password
NOTE: On a GNU/Linux distribution, a password prompt will not display your keyboard inputs.
Change the user password with the following command (replace username
with the actual name of the user account):
Remember to use the regular boot mode of your server when restarting it in your OVHcloud Control Panel.
Refer to the corresponding rescue mode guide if necessary.
You now have access to the server with your new password.
Go further
For more information and tutorials, please see our other Dedicated Servers support guides or explore the guides for other OVHcloud products and services.