Thursday, November 7, 2019

Reset the AdminServer Password in WebLogic 11g and 12c

If you forget the AdminServer password for your WebLogic 11g domain, you can reset it from the command line using the following process.
   •    Set up the following environment variables. They are not necessary for the process itself, but will help you navigate. In this case my domain is called "ClassicDomain". Remember to change the value to match your domain.

$ export MW_HOME=/u01/app/oracle/product/12c
$ export DOMAIN_HOME=$MW_HOME/user_projects/domains/base_domain

   •    Shut down the WebLogic domain.
$ $DOMAIN_HOME/bin/stopWebLogic.sh

   •    Rename the data folder.
$ mv $DOMAIN_HOME/servers/AdminServer/data $DOMAIN_HOME/servers/AdminServer/data-old

   •    Set the environment variables.
$ . $DOMAIN_HOME/bin/setDomainEnv.sh

   •    Reset the password using the following command. Remember to substitute the appropriate username and password.

$ cd $DOMAIN_HOME/security
$ java weblogic.security.utils.AdminAccount <username> <password> .

NOTE:- There is a . (DOT) at the end of the Above command which represents the Current Directory. Here you can see that after this command Executes A new “DefaultAuthenticatorInit.ldift” file will be created in the Current Directory.

   •    Update the "$DOMAIN_HOME/servers/AdminServer/security/boot.properties" file with the new username and password. The file format is shown below.
username=<username>
password=<password>


   •    Start the WebLogic domain.
$ $DOMAIN_HOME/bin/startWebLogic.sh

For more information see:
How to Change the WebLogic Server Administrator Password [ID 1082299.1]

No comments:

Post a Comment