Skip to content

This program will take care of the main partition detection, mounting , and new root directory detection to make the password reset possible. Fully automated for your OVHcloud server.

Notifications You must be signed in to change notification settings

christiangoeschel/passwdreset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge Static Badge

Changing the user password of an OVHcloud server if you have lost it



It can sometimes happen that you lose or forget your user password and now are not able to SSH into your server and neither use the KVM from the OVHcloud control panel.

Eventhough, OVHcloud provides it's customers with a guide on how to fix the issue, sometimes things just have to be done very quickly and without too much typing. Or maybe you have lost it for multiple servers and need a quick and scalable solution.

This is where this Bash script comes in handy. With just one command you can deploy the script to your server in rescue mode and the script will handle the main partition detection, mount point creation, mounting and the password change.

The only thing you will have to do is to specify the username of your main OS (the account you lost the password for) and re-enter your new password twice.

That's it!

Usage:

Before you can use the Bash script you will have to boot your server in rescue mode first. You can do that in the OVHcloud control panel on your server's dashboard.

After that you will receive temporary login credentials which you will need for the one line command that will deploy and launch the password change script.

Once you have received the credentials, login to your server and enter this one line command in your terminal:

Command:

wget https://raw.githubusercontent.com/christiangoeschel/passwdreset/main/passwordreset.sh && chmod +x passwordreset.sh && clear && source passwordreset.sh

Hit enter and let the script do the rest.

If you have any questions or trouble feel free to contact the OVHcloud technical support or refer to the guides down below:


VPS


Changing password if you have lost it:

https://help.ovhcloud.com/csm/en-ca-vps-root-password?id=kb_article_view&sysparm_article=KB0047679#changing-the-password-if-you-have-lost-it

How to boot into rescue mode:

https://help.ovhcloud.com/csm/en-ca-vps-rescue?id=kb_article_view&sysparm_article=KB0047655#:~:text=Rescue%20mode%20is%20a%20tool,Resetting%20your%20root%20password

Dedicated server


Changing password if you have lost it:

https://help.ovhcloud.com/csm/en-ca-dedicated-servers-root-password?id=kb_article_view&sysparm_article=KB0043305

How to boot into rescue mode:

https://help.ovhcloud.com/csm/en-ca-dedicated-servers-ovhcloud-rescue?id=kb_article_view&sysparm_article=KB0030995#:~:text=You%20can%20activate%20rescue%20mode,select%20Boot%20in%20rescue%20mode.

About

This program will take care of the main partition detection, mounting , and new root directory detection to make the password reset possible. Fully automated for your OVHcloud server.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages