Recover CloudStack Database Password

If you ever need to get back your CloudStack database password, you can easily do so as below:

  1. Grab the encrypted password from /etc/cloudstack/management/
    [root@csman2-1 ~]# grep ^ /etc/cloudstack/management/
  2. Retrieve the management key from the file /etc/cloudstack/management/key
    [root@csman2-1 ~]# cat /etc/cloudstack/management/key
  3. Finally, decrypt the database password
    [root@csman2-1 ~]# java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.0.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI input=tFogV+Zf2JGHSquhVOumuA== password=password verbose=true
    Runtime: Sun Microsystems Inc. OpenJDK 64-Bit Server VM 20.0-b12 
    verbose: true
    input: tFogV+Zf2JGHSquhVOumuA==
    password: password

Shanker Balan

Shanker Balan is a devops and infrastructure freelancer with over 14 years of industry experience in large scale Internet systems. He is available for both short term and long term projects on contract. Please use the Contact Form for any enquiry.

More Posts - Website

Follow Me: