Using obfuscated passwords in configuration files
Procedure
-
Locate the Jetty utility jar file that is used to obfuscate the clear text password.
ls /opt/hpe/ssmc/jetty/lib/jetty-util-*.jar
-
Run the following command:
/opt/hpe/ssmc/jre/bin/java -cp /opt/hpe/ssmc/jetty/lib/jetty-util-<version>.jar org.eclipse.jetty.util.security.Password '<new password>'
NOTE:If you are using special characters within <new password>, then it is important to quote the password argument as per standard Linux shell syntax. For more information on quoting strings with special characters, see https://pubs.opengroup.org/onlinepubs/7908799/xcu/chap2.html.
Example 1/opt/hpe/ssmc/jetty/lib# /opt/hpe/ssmc/jre/bin/java -cp /opt/hpe/ssmc/jetty/ lib/jetty-util-9.4.6.v20170531.jar org.eclipse.jetty.util.security.Password 'HpeStorage$1234' 2020-08-13 17:38:10.923:INFO::main: Logging initialized @226ms to org.eclipse.jetty.util.log.StdErrLog HpeStorage$1234 OBF:1doz1lfg1j1u1fa91j9r1v2h1w221ri71w1g1v1x1j5b1f8d1iz01lc21dnv MD5:d673c6955d839aa3a6cddf797f7cc6f8
Example 2/opt/hpe/ssmc/jre/bin/java -cp /opt/hpe/ssmc/jetty/lib/jetty-util-9.4.6.v20170531.jar org.eclipse.jetty.util.security.Password 'HpeStorage$99()@@^!"' 2020-08-13 17:37:21.406:INFO::main: Logging initialized @266ms to org.eclipse.jetty.util.log.StdErrLog HpeStorage$99()@@^!" OBF:1a5h1hvy1rpi1i8i1os31j9h1jnt1jmv1ktp1gao1g721kr51jkn1jjp1j5l1op71i7g1rp41hrk1a3d MD5:23866feda58fadbfe9d3b9c4a9f804a1
Cross check whether the utility has picked up the intended password, by matching the password value you pass into the command input with the console output of the utility.