Recover Weblogic Server Admin password
Thanks to Marcin @eMarcel.com I managed to retrieve the Weblogic Admin password.
For archival and with some changes for eBS 12.2, the steps:
create a python script with vi (e.g. decrypt.py):
from weblogic.security.internal import * from weblogic.security.internal.encryption import * encryptionService = SerializedSystemIni.getEncryptionService(".") clearOrEncryptService = ClearOrEncryptedService(encryptionService) # Take encrypt password from user pwd = raw_input("Paste encrypted password ({AES}fk9EK...): ") # Delete unnecessary escape characters preppwd = pwd.replace("\\", "") # Display password print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)
set the environment with
. $EBS_DOMAIN_HOME/bin/setDomainEnv.sh
Get the encrypted password:
grep password $EBS_DOMAIN_HOME/servers/AdminServer/security/boot.properties | sed -e "s/^password=\(.*\)/\1/"
Run the python script with:
java weblogic.WLST decrypt.py Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Please enter encrypted password (Eg. {AES}fk9EK...): {AES}jkIkkdh693dsyLt+DrKUfNcXryuHKLJD76*SXnPqnl5oo\= Decrypted string is: welcome01
The same script can also be used for other passwords in $EBS_DOMAIN_HOME/config/……