How to reset the WebLogic Admin Server password

If you ever lose or forget your WebLogic Admin Server password, and you need to reset it, here’s how (tested against WLS 10.3)…

Set the following environment variables (updating the <domain_name> as appropriate):

export MW_HOME=/u01/app/oracle/product/middleware
export DOMAIN_HOME=$MW_HOME/user_projects/domains/<domain_name>
export CLASSPATH=$CLASSPATH:$MW_HOME/wlserver_10.3/server/lib/weblogic.jar
. $DOMAIN_HOME/bin/setDomainEnv.sh

Shutdown your WebLogic domain:

$DOMAIN_HOME/bin/stopWebLogic.sh

Rename and backup the DefaultAuthenticatorInit.ldift file:

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

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

java weblogic.security.utils.AdminAccount <username> <new_password> .

NOTE: Don’t forget the period “.” at the end of this command, otherwise you’ll 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 next time the WebLogic Admin server starts up).

Edit the boot.properties file and update the password with the one you used above:

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

vi boot.properties
password=<username>
username=<new_password>

Repeat this for any Managed Servers in the domain with a boot.properties file. The clear text password will be encrypted next time the server starts.

Now restart your WebLogic Domain:

$DOMAIN_HOME/startWebLogic.sh

Now you should be able to log into your WebLogic console!

For Windows environments, the process is the same, except the .sh shell scripts would be .cmd command extensions, and obviously you would use the ‘set’ command instead of ‘export’ to set your environment variables etc.

3 thoughts on “How to reset the WebLogic Admin Server password

Leave a comment

Your email address will not be published. Required fields are marked *