Finding Existing weblogic password in OEM
- To get the existing weblogic's password, please do the below:
1. Weblogic's password is stored in encrypted form in 'password' field in the file -
/u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties. Get the encrypted password from it.
cat boot.properties
# Generated by Configuration Wizard on Sun Mar 29 13:21:08 CEST 2020
username={AES}i3XAY7iKtI9kZ2sd6jqu9nKnUoiBAXXYnua7qQaQYWMUxQ=
password={AES}A1W4HlGanBCEFqLyNpdzgRR16V/ls6EIdptRjg5Kn2/YU0=
2. Run the below commands to get the plain password from encrypted format :
cd /opt/oracle/gc_inst/user_projects/domains/GCDomain/bin
. ./setDomainEnv.sh
3. Now you will be under /u01/app/oracle/gc_inst/user_projects/domains/GCDomain
Create a java file to convert the password to text format.
vi 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. compile the Java script.
javac recoverpassword.java
5. Replace the encrypted password find in step 1 in below command and run, it displays the password in text format.
java -cp $CLASSPATH:. recoverpassword /orasoft/oracle/gc_inst/user_projects/domains/GCDomain {AES}A1W4HlGanBCEFqLyNpdzgRR16V/ls6EIdptRjg5Kn2/YU0=
Opoldrgx123
Above is the password in text format.
same method you can follow if you want to know the username.
No comments:
Post a Comment