Friday, July 17, 2009

Recovering Weblogic Domain administrator password

The scenario - I have installed WLS and forgotten the weblogic domain admin password -

A big thanks to my colleague Silviu for this workaround -

1. At the command line, change directory to the domain and run the setEnv or setDomainEnv script to set the PATH and CLASSPATH.
2. cd /security
3. mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift_BKP
4. run java weblogic.security.utils.AdminAccount ./
-above command will Create a new DefaultAuthenticatorInit.ldift

4. cd /servers//data/ldap
5. mv DefaultAuthenticatormyrealmInit.initialized DefaultAuthenticatormyrealmInit.initialized_BKP
6. Restart the Admin Server.
7. Login with new username/password

* To change the old admin user identity, log into the admin console and change the password from console.

Possible error, due to missing library? -->( Error: Native Library(terminalio) to read the password securely from commandline is not found).

add -Dweblogic.management.allowPasswordEcho=true in setDomainEnv script to be allowed to enter the password in echo mode.

After that, log in as the new user and change the password of user weblogic.

3 comments:

Jehanzeb Qayyum said...

i have followed the above steps. but now i can login+boot with both default password i.e. weblogic and new password. Does not new password is supposed to overwrite default weblogic pass?

Niall Commiskey said...

Hi Jehanzeb,

I'll check this out.

Niall Commiskey said...

Essentially Jehanzeb you have created a new "temp" admin user with a new admin pwd. You log in as this new admin user and re-set the password for the user "weblogic". After doing this you can log in as weblogic and delete the "temp" admin user. You do not need it anymore.