Steps To Decrypt Weblogic Password
We can decrypt weblogic password from boot.properties file using below steps to recover the lost weblogic admin password.
Please follow the below steps:
1.Run $WL_HOME/server/bin/setWLSEnv.sh/bat
2.cd to $WL_HOME/user_projects/domains/DomainName/security(Check and make sure SerializedSystemIni.dat file is present or not)
Before proceeding , make note of the encrypted password.
You can find the encrypted weblogic password in the boot.properties file at $WL_HOME/user_projects/domains/domain_name/servers/AdminServer/security/
3.Run java weblogic.WLST or You can try the wlst.sh/bet at this location: ***/bea/weblogic92/common/bin (make sure common environment is set else error may come)
4.When wlst prompt appears , issue the below commands one by one.
import weblogic.security.internal.SerializedSystemIni import weblogic.security.internal.encryption.ClearOrEncryptedService setlib=weblogic.security.internal.SerializedSystemIni.getEncryptionService(".") ces=weblogic.security.internal.encryption.ClearOrEncryptedService(setlib) ces.decrypt("encrypted_password")
Where
encrypted_password
is the password you copied from boot.properties file.
Troubleshooting:
If you get error like below then make sure the path is writable as it creates a temporary file.
setlib=weblogic.security.internal.SerializedSystemIni.getEncryptionService(".")
Change it to below incase of errors
setlib=weblogic.security.internal.SerializedSystemIni.getEncryptionService("/tmp")
Traceback (innermost last): File "<console>", line 1, in ? weblogic.security.internal.FileUtilsException: [Security:090192]couldn't create temporary file for SerializedSystemIni.dat , .new, /opt/./security at weblogic.security.internal.FileUtils.error(FileUtils.java:23) at weblogic.security.internal.FileUtils.replace(FileUtils.java:88) at weblogic.security.internal.SerializedSystemIni.write(SerializedSystemIni.java:100) at weblogic.security.internal.SerializedSystemIni.<init>(SerializedSystemIni.java:112) at weblogic.security.internal.SerializedSystemIni.getEncryptionService(SerializedSystemIni.java:260) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:168) at org.python.core.PyObject.__call__(PyObject.java:270) at org.python.core.PyObject.invoke(PyObject.java:2041) at org.python.pycode._pyx27.f$0(<console>:1) at org.python.pycode._pyx27.call_function(<console>) at org.python.core.PyTableCode.call(PyTableCode.java:208) at org.python.core.PyCode.call(PyCode.java:14) at org.python.core.Py.runCode(Py.java:1135) at org.python.core.Py.exec(Py.java:1157) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:148) at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89) at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70) at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:44) at weblogic.management.scripting.WLST.main(WLST.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at weblogic.WLST.main(WLST.java:29) Caused by: java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1345) at java.io.File.createTempFile(File.java:1434) at weblogic.security.internal.FileUtils.replace(FileUtils.java:85) ... 27 more weblogic.security.internal.FileUtilsException: weblogic.security.internal.FileUtilsException: [Security:090192]couldn't create temporary file for SerializedSystemIni.dat , .new, /opt/./security
If you are getting error like below then make sure that the password is not AES encrypted. AES encrypted passwords are not decryptable .
Example O/P for AES password decrypt:
wls:/offline> import weblogic.security.internal.SerializedSystemIni
wls:/offline> import weblogic.security.internal.encryption.ClearOrEncryptedService
wls:/offline> setlib=weblogic.security.internal.SerializedSystemIni.getEncryptionService(“.”)
wls:/offline> ces=weblogic.security.internal.encryption.ClearOrEncryptedService(setlib)
wls:/offline> ces.decrypt(“{AES}P9lNKBmDpXIGphA9FDPyy8re+cdIpe2UhhYGTUUW0YM\=”)
Traceback (innermost last):
File “<console>”, line 1, in ?
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:139)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:187)
at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
weblogic.security.internal.encryption.EncryptionServiceException: weblogic.security.internal.encryption.EncryptionServiceException
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.