User Tools

Site Tools


cloudstack:decrypt_db_password

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

Grab the encrypted password from /etc/cloudstack/management/db.properties

[root@csman2-1 ~]# grep ^db.cloud.pass /etc/cloudstack/management/db.properties 
db.cloud.password=ENC(tFogV+Zf2JGHSquhVOumuA==)

Retrieve the management key from the file /etc/cloudstack/management/key

[root@csman2-1 ~]# cat /etc/cloudstack/management/key
password
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 decrypt.sh input=tFogV+Zf2JGHSquhVOumuA== password=password verbose=true
 
----ENVIRONMENT-----------------
 
Runtime: Sun Microsystems Inc. OpenJDK 64-Bit Server VM 20.0-b12 
 
----ARGUMENTS-------------------
 
verbose: true
input: tFogV+Zf2JGHSquhVOumuA==
password: password
 
----OUTPUT----------------------
 
cloud
cloudstack/decrypt_db_password.txt · Last modified: 2014/06/10 09:33 by slayer