Sunday, February 1, 2015

Weblogic Console Password Recovery

Procedure to know the console password
   
Step1. Run setEnv.cmd/setEnv.sh from your Location@ E:\psft\PSHDEV\webserv\peoplesoft\bin directory to set necessary domain environment variables in command prompt.
 


Step2. Place the below script “RecoverPassword.java” file in E:\psft\PSHDEV\webserv\peoplesoft\security directory and paste the following code into it:

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("Paste encrypted password ({AES}fk9EK...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)


Step3. Execute the command “java weblogic.WLST RecoverPassword.java “from the location E:\psft\PSHDEV\webserv\peoplesoft\security 



Note: Take the encrypted password from “boot.properties” file and paste it when prompted for password in the above step.
Location @ E:\psft\PSHDEV\webserv\peoplesoft\servers\PIA\security\ boot.properties



Steps to reset the password for WebLogic Admin Console


Step1. Run setEnv.cmd/setEnv.sh from your Location@ E:\psft\PSHDEV\webserv\peoplesoft\bin directory to set necessary domain environment variables in command prompt for windows and shell prompt for UNIX as above tool requires weblogic.jar to run .

Step2. Backup or rename the DefaultAuthenticatorInit.ldift file located under your Location@ E:\psft\PSHDEV\webserv\peoplesoft\security directory as Step 3 creates a new DefaultAuthenticatorInit.ldift file with modification specified.


Step3. From Location@ E:\psft\PSHDEV\webserv\peoplesoft\security directory run the below command.
"java weblogic.security.utils.AdminAccount weblogic <new_passwd> ." 
Note: There is a . (DOT) at the end of the above command which represents the Current Directory. A new “DefaultAuthenticatorInit.ldift” file will be created after the command is executed in the current directory.

Step4. Rename the data directory to data.bkp located under your E:\psft\PSHDEV\webserv\peoplesoft\servers\PIA\data. 
Step5. Rename all the instances of boot.properties to boot.properties.bkp located @ E:\psft\PSHDEV\webserv\peoplesoft\servers\PIA\security\ boot.properties

 Step6. Create a new boot.properties with new password @ E:\psft\PSHDEV\webserv\peoplesoft\servers\PIA\security\ boot.properties. As recommended to avoid prompting for Username and Password while starting the WebLogic instance this step is mandatory.
Note: Make sure the boot.properties is not having any extra special characters (UTF or Invisible characters) or spaces except the above two lines. Also there should be no Heading or Trailing SPACE character in these two Lines.

Step7. Issue a Startup command to WebLogic instance and monitor the logs. If you are using Windows service for startup of WebLogic then you might also need to delete the existing windows service and install the windows service with new credentials. Please refer WebLogic Server instance as Windows Service .

No comments :

Post a Comment