weblogic@appserver /$ cd /data/weblogic/bea1036/user_projects/domains/base_domain
First let’s get the encrypted information from boot.properties file:
weblogic@appserver base_domain$ cat servers/AdminServer/security/boot.properties
# Generated by Configuration Wizard on Wed Jun 04 10:22:47 EEST 2014
username={AES}nPuZvKIMjH4Ot2ZiiaSVT/RKbyBA6QITJE6ox56dHvk=
password={AES}krCf4h1du93tJOQcUg0QSoKamuNYYuGcAao1tFvHxzc=
The encrypted information starts with {AES} and ends with equal (=) sign. To decrypt the username and password,we will create a simple java application:
weblogic@appserver base_domain$ cat recoverpassword.java
public class recoverpassword {
public static void main(String[] args)
{
System.out.println(
new weblogic.security.internal.encryption.ClearOrEncryptedService(
weblogic.security.internal.SerializedSystemIni.getEncryptionService(args[0]
)).decrypt(args[1]));
}
}
Save it as “recoverpassword.java”. To be able to compile (and run) it,we need to set environment variables (we’re still in base_domain folder). We’ll give the encrypted part as the last parameter:
weblogic@appserver base_domain$ . bin/setDomainEnv.sh
weblogic@appserver base_domain$ javac recoverpassword.java
weblogic@appserver base_domain$ java -cp $CLAsspATH:. recoverpassword \
$DOMAIN_HOME {AES}nPuZvKIMjH4Ot2ZiiaSVT/RKbyBA6QITJE6ox56dHvk=
windows: java -cp %CLAsspATH%;. recoverpassword %DOMAIN_HOME% {AES}nPuZvKIMjH4Ot2ZiiaSVT/RKbyBA6QITJE6ox56dHvk=
windows: java -cp %WEBLOGIC_CLAsspATH%;. recoverpassword %DOMAIN_HOME% {AES}nPuZvKIMjH4Ot2ZiiaSVT/RKbyBA6QITJE6ox56dHvk=