Recover weblogic password in 4 steps - Weblogic 12c

The Objective

In this post, we will see the easiest way possible to decrypt the WebLogic admin server password. in other words, recovering WebLogic password.

You do not need to create a JAR file or copy any security-related files etc.

You do not even need your AdminServer to be running.

Just in 4 Steps. You can decrypt or recover the password of any WebLogic domain.

Steps to recover WebLogic Password

Step1:   In the terminal (putty/cmd) go to your domain/bin directory where your setDomainEnv.sh file resides

cd /apps/oracle-weblogic/domains/mwidomain/bin

Step2:  Execute the setDomainEnv.sh with sourcing ( adding an extra dot while executing the script)

. ./setDomainEnv.sh

Step3:  Start WLST  by executing the following command

java weblogic.WLST

Step4:  Once you are into the WLST terminal ( in offline mode) execute the following commands one by one

Note*: Make sure you update the location of boot.properties in the second step

from weblogic.security.internal import BootProperties

BootProperties.load("/apps/oracle-weblogic/domains/mwidomain/servers/AdminServer/security/boot.properties", false)

prop = BootProperties.getBootProperties()

print "username: " + prop.getOneClient()

print "password: " + prop.getTwoClient()

The Last two commands would decrypt the password from the boot.properties and display it to you.

Steps IN Action

Just in case you cannot play the clip refer the following terminal log.

aksarav@middlewareinventory:/apps/oracle-weblogic/domains/mwidomain$ cd bin
aksarav@middlewareinventory:/apps/oracle-weblogic/domains/mwidomain/bin$ . ./setDomainEnv.sh 
aksarav@middlewareinventory:/apps/oracle-weblogic/domains/mwidomain$ java weblogic.WLST 

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> from weblogic.security.internal import BootProperties
wls:/offline> BootProperties.load("/apps/oracle-weblogic/domains/mwidomain/servers/AdminServer/security/boot.properties", false)
wls:/offline> prop = BootProperties.getBootProperties()
wls:/offline> print "username: " + prop.getOneClient()
username: weblogic
wls:/offline> print "password: " + prop.getTwoClient()
password: weblogic1
wls:/offline> exit()


Exiting WebLogic Scripting Tool.

 

And. That's how it is done.

Hope it helps.

Thanks,

Sarav AK

Follow me on Linkedin My Profile
Follow DevopsJunction onFacebook orTwitter
For more practical videos and tutorials. Subscribe to our channel

Buy Me a Coffee at ko-fi.com

Signup for Exclusive "Subscriber-only" Content

Loading