Monday 13 April 2015

Recovery / Decrypt of Weblogic server Admin Password

when ever we forget the password of admin server we can  perform two activities to retrieve access to console.
1. Decrypt the password using WLST.
2. Reset the Admin password.

In this post, we will learn how to decrypt the password using WLST. Before we execute the below steps make sure that SerializedSystemIni.dat file  is located in $DOMAIN_HOME/security directory which contains encrypted security data.

Steps to decrypt the Weblogic Server Admin password:

Step 01 : copy the encrypted password from boot.properties and paste it in the notepad.


Step 02:  Navigate till wls_home/server/bin folder
Ex: /u01/Oracle/Middleware/wlserver_10.3/server/bin

Step 03: Run the below command to set environment
. ./setWLSEnv.sh

Step 04: Navigate till security folder under domain home.
ex: /u01/Oracle/Middleware/user_projects/domains/ATS_domain/security

Step 05:  create decrypt_password.py with following code.

from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)
# Take encrypt password from user
pwd = raw_input("Enter your encrypted password :")
# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")
# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)



Step 06:  Run below command
java weblogic.WLST decrypt_password.py

Note :it will prompt for encrypted password, paste the encrypted password from notepad which we copied earlier.


SerializedSystemIni.dat#sthash.CuW7VK1R.dp
SerializedSystemIni.dat#sthash.CuW7VK1R.dpuf
SerializedSystemIni.dat#sthash.CuW7VK1R.dpuf
SerializedSystemIni.dat#sthash.CuW7VK1R.dpu