Skip to main content
GRID/OEM

Recovering OEM13c WebLogic Password

By January 9, 2023May 2nd, 2023No Comments2 min read

There are few cases where some key passwords are missing due to not maintaining password repository. So there is trusted way from Oracle where we can recover the password.

Access the file boot.properties from the below folder, but the username and passwords are encrypted.

[oracle@oemhost:oemqa] /oracle/emc13c > cat /opt/oracle/emc13c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties
# Generated by Configuration Wizard on Sat Feb 17 01:51:59 CST 2018
username={AES}rukyPyDdeLOb1RCpjl9KuP8D5EB1UDvooJQy3zAorsM=
password={AES}5+VFMQrfBRgdMfu3zPup5/u7rKBO1I7oAuM4s3VlQIY=
[oracle@oemhost:oemqa] /oracle/emc13c >

To recover the password, we have to use recoverpassword.java which is default template available.

[oracle@oemhost:oemqa] /oracle/emc13c > cat /opt/oracle/emc13c/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]));
}
}
[oracle@oemhost:oemqa] /oracle/emc13c >

Update the weblogic setting using below script

[oracle@oemhost:oemqa] /oracle/emc13c > cd /opt/oracle/emc13c/gc_inst/user_projects/domains/GCDomain/bin
[oracle@oemhost:oemqa] /GCDomain/bin > ./setDomainEnv.sh
[oracle@oemhost:oemqa] /GCDomain/bin >

Access the recover files from the below mentioned directory

oracle@oemhost:oemqa] /oracle/emc13c > cd /opt/oracle/emc13c/gc_inst/user_projects/domains/GCDomain
[oracle@oemhost:oemqa] /domains/GCDomain > ls -ltr recover*
-rw-r--r--    1 oracle   dba             274 Oct 09 16:57 recoverpassword.java
-rw-r--r--    1 oracle   dba             801 Oct 09 16:57 recoverpassword.class
[oracle@oemhost:oemqa] /domains/GCDomain >

Now you can run the recoverpassword by calling the java binary as below

[oracle@oemhost:oemqa] /domains/GCDomain > java -cp $CLASSPATH:. recoverpassword $DOMAIN_HOME {AES}5+VFMQrfBRgdMfu3zPup5/u7rKBO1I7oAuM4s3VlQIY=
Oracle123**
[oracle@oemhost:oemqa] /domains/GCDomain >

The java binary can recover the password by decrypting using the files.

Leave a Reply