Question


How can I reset an OnApp password at the command prompt?


Answer


  1. Log in to your OnApp Cloud Control Panel using SSH:

    ssh root@your.hostname
    CODE
  2. Go to the directory where your Control Panel is installed:

    cd /onapp/interface
    CODE
  3. To generate a random password, run the following rake task:

    rake onapp:password[admin_login]
    CODE
  4. To set a predefined password, run:

    rake onapp:password[admin_login,new_password]
    CODE

Make sure there are no spaces in brackets. If successful, a “Password successfully changed to 'new_password'” message appears. If the operation cannot be completed, you will get the list of errors.

Example

# 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'
CODE

The command with a new unencrypted password will be left in the history file. For security purposes, it is recommended to clear the command history.