We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
How do you reset OnApp password via command line?
Environment
OnApp 5.x
Answer
- Log in to OnApp Cloud Control Panel using SSH:
ssh root@your.hostname
- Go to the directory, where your Control Panel is installed:
cd /onapp/interface
- To generate a random password, run the following rake task:
rake onapp:password[admin_login]
- To set a predefined password, run:
rake onapp:password[admin_login,new_password]
Make sure there are no spaces in brackets. Upon success, you will get a “Password successfully changed to 'new_password'” message. If the operation cannot be completed, you will get the list of errors.
Examples:
# rake onapp:password[onappsupport] [2014-07-16 14:41:45 -0400] Password successfully changed to 'CyYEkRSbOio1' # rake onapp:password[onappsupport,6ka1ljm2en4gy7tws5f3] [2014-07-16 14:45:28 -0400] Password successfully changed to '6ka1ljm2en4gy7tws5f3'
Note: the command with a new unencrypted password will be left in the history file. For security purpose, it is recommended to clear the command history.