Thursday, December 12, 2013

Reset the AdminServer Password in WebLogic 11g and 12c

Hello Everyone,

After a long time posting something which is  very easy to implement and important as part of administrators work.

If you forget the AdminServer password for your WebLogic 11g domain, you may have multiple options to recover the same. here we are going to discuss about resetting it from the command line using the following process.

We will check this process step by step :

Step 1:

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 "12C_Domain". Remember to change the value to match your domain.

export MW_HOME=/Oracle/Middleware
export DOMAIN_HOME=$MW_HOME/user_projects/domains/12C_Domain

Step 2:
Shutdown all domains including managed server, Admin server and Node Manager.

./stopWeblogic.sh or kill -9 <process_id>

Step 3:
Rename data folder from below path i.e. in my case $DOMAIN_HOME/servers/AdminServer

mv $DOMAIN_HOME/servers/AdminServer/data $DOMAIN_HOME/servers/AdminServer/data_bkp

Step 4 :
set environment variable for domain as follows
./setDomainEnv.sh

Step 5:
Reset the password using the following command. Remember to substitute the appropriate username and password.

change directory to security folder :

cd $DOMAIN_HOME/security

run below command to change admin password :

java weblogic.security.utils.AdminAccount weblogic admin123 .

Note : weblogic is user name and admin123 is new password which we need to set.

Step 6:
If you specify password in boot.properties then you have to change it in below files :
Update the "$DOMAIN_HOME/servers/AdminServer/security/boot.properties" file with the new username and password. The file format is shown below.
username=weblogic
password=admin123

Step 7:
Now start admin server as follows with new credantials .
./startWeblogic.sh

I know this is very easy steps but many of the time we unable to recollect easy steps to handle such issues or operations.

If you have any queries you can write me on middlewaresolution1@gmail.com

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com

No comments:

Post a Comment