In this post we will discuss the steps to decrypt WebLogic credential from Boot Properties. During OEM upgrade process when WebLogic password is required, if you have forget the password you can decrypt the WebLogic credential using below steps.
1.Go to your domain/bin directory where setDomainEnv.sh file present.
oracle=>cd /u01/app/app00/cloudc/gc_inst/user_projects/domains/GCDomain/bin
oracle=>ls -ltr
total 60
drwxr-x—. 2 oracle dba 4096 Aug 6 2018 nodemanager
drwxr-x—. 2 oracle dba 4096 Aug 6 2018 service_migration
drwxr-x—. 2 oracle dba 4096 Aug 6 2018 server_migration
-rwxr-x—. 1 oracle dba 6304 Aug 6 2018 startEMServer.sh
-rwxr-x—. 1 oracle dba 5698 Aug 6 2018 startWebLogic.sh
-rwxr-x—. 1 oracle dba 2001 Aug 6 2018 stopWebLogic.sh
-rwxr-x—. 1 oracle dba 3243 Aug 6 2018 startManagedWebLogic.sh
-rwxr-x—. 1 oracle dba 2479 Aug 6 2018 stopManagedWebLogic.sh
-rwxr-x—. 1 oracle dba 16530 Aug 6 2018 setDomainEnv.sh
2. Collect encrypted information from boot.properties file.
oracle=>locate boot.properties
/u01/app/app00/cloudc/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties
oracle=>more /u01/app/app00/cloudc/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties
# Generated by Configuration Wizard on Wed Aug 06 15:42:00 IST 2018
username={AES}xxxx
password={AES}yyyy
=>/u01/app/app00/cloudc/gc_inst/user_projects/domains/GCDomain
3. Create below sample java script and save it as recoverpassword.java.
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]));
}
}
4. Execute the setDomainEnv.sh .
oracle=>. ./setDomainEnv.sh
5. Use the below to get the password in readable format.
oracle=>java -cp $CLASSPATH:. recoverpassword $DOMAIN_HOME {AES}yyyy
good
Thank you for giving your valuable time to read the above information.