Tuesday, October 26, 2010

How to change Weblogic Admin password ?

As I am working on different Middlewares. Oracle Weblogic Server is one of them.

Once I forgot my Weblogic admin password, i tried some time and then i have got solution for the same.

Thanks for the Oracle Metalink.

Following are the steps to recover an admin user when you have lost an administrator's password.

In my case i have created a userid "Weblogic" with a password "weblogicadmin123"

This post is for both Windows and Unix as well :

Step 1. From UNIX prompt cd to the WebLogic domain directory and run setEnv.cmd/setEnv.sh

Make sure your environment gets set correctly, check that WL_HOME is set. If not trying running setEnv.sh like this:

. ./setEnv.sh (there is a dot "." then a space then ./setEnv.sh)

Create an initialization file for the default authenticator

java weblogic.security.utils.AdminAccount adminuser weblogic .

Don't forget to add the "." it is needed.

This should produce a DefaultAuthenticatorInit.ldift in the domains directory.

Step 2. Delete the DefaultAuthenticatormyrealmInit.initialized from /webserv/DomainName/WebLogicAdmin/ldap

Step 3. Once you delete this file and try to start the admin server it gets recreated using the DefaultAuthenticatorInit.ldift file as a template.

Step 4. Rename the boot.properties file.

Step 5. Edit the setEnv.cmd/setEnv.sh file and change:

WLS_USER­=weblogic

WLS_PW=weblogicadmin123

Step 6. Reboot the admin server.

Step 7. Put the boot.properties file back to it's original name and change so it looks like the one below:

username­=weblogic

password=weblogicadmin1234

Step 8. Restart the admin server and those values will then get encrypted.

Step 9. You can now go into the console and fix the system password if you wish or keep using the adminuser account.

To fix the system password from the console, logon as adminuser and navigate to:

Security / Realms / myrealm / users - Click on system, Next to Password click on Change. Enter the new password and click apply.

No comments:

Post a Comment