Wednesday, March 11, 2020

How to reset the Weblogic admin server password


In some case we need to change the weblogic password, and then we can follow the below steps to reset it.

Step 1:

Set the following environment variables (update the domain name    as appropriate):

export FMW_HOME=/u01/app/oracle/product/middleware
export DOMAIN_HOME=$FMW_HOME/user_projects/domains/
export CLASSPATH=$CLASSPATH:$MW_HOME/wlserver_10.3/server/lib/weblogic.jar

NOw we will run the env as shown below.
. $DOMAIN_HOME/bin/setDomainEnv.sh

Step 2:

Need to shut down weblogic domain:
$DOMAIN_HOME/bin/stopWebLogic.sh

Step 3:

Rename and backup the DefaultAuthenticatorInit.ldift file as shown below,

cd $DOMAIN_HOME/security
mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift.old

Now run the following command to generate a new DefaultAuthenticatorInit.ldift file. ((here ‘weblogic’ is default username))

java weblogic.security.utils.AdminAccount .

Note: Don't forget the period "." at the end of the this command, otherwise you will get "Error: Invalid arguments"

Rename and backup the following LDAP directory.

mv $DOMAIN_HOME/servers/AdminServer/data/ldap $DOMAIN_HOME/servers/AdminServer/data/ldap.old
(This ldap directory will be recreated once weblogic server startup time)

Step 4:


Back and Edit the boot.properties file and update the new password. (Above new_password)

cd $DOMAIN_HOME/servers/AdminServer/security
cp boot.properties  boot.properties_old

vi boot.properties
password=
username=

(Note: New password will be encrypted once server starts)

Step 5:


Now start your weblogic domain.

[oracle@appserver01 bin]# cd /root/MW_home/user_projects/domains/base_domain/bin/
[oracle@appserver01 bin]# ls
nodemanager  nohup.out  server_migration  service_migration  setDomainEnv.sh 
startManagedWebLogic.sh  startWebLogic.sh  stopManagedWebLogic.sh  stopWebLogic.sh
[oracle@appserver01 bin]# nohup ./startWebLogic.sh &
[oracle@appserver01 bin]# nohup: appending output to `nohup.out'
[oracle@appserver01 bin]# tail -f nohup.out 

Server state during the startup:
 
 
 
 
 
 

Now we can access your weblogic console page.

No comments: