Advertisements

Forgot weblogic user password – How to reset the weblogic user

If you have forgotten your weblogic user password, and would like to reset the user, this post might help…

One of my colleagues could not remember the password for his weblogic user in his local OBIEE installation, and asked for my assistance.  I did not know how to go about resetting the password, and so I had to search for a solution. 

After trying the steps from a few different posts related to this issue, the steps in the post found here worked.

I made a few minor modifications and copied the steps here for your convenience.

—————–

Note: This process will remove all users created in WebLogic’s embedded LDAP server and there will only be one user (which will act as superuser) after doing below steps.

+++++++++++++++++++++++++++++++++++++++++++++++++++++

Steps to recreate weblogic superuser (when password of existing user is forgotten)

1.      Shutdown WebLogic Server (If Running) – Optional Step

2. Login to WebLogic Server and set environment variable

cd $DOMAIN_HOME/bin   (where DOMAIN_HOME is the directory in which your domain exists, default value is $MW_HOME/user_projects/domain/base_domain), and execute the following …

. ./setDomainEnv.sh (Linux/Unix)  -or- setDomainEnv.cmd (Windows)

 

3. Create an initialization file using the following command. (Note the DOT at end of this command)

java weblogic.security.utils.AdminAccount <weblogic_username> <weblogic_user_password> . 

For Example – (Note the DOT at end of this command):

java weblogic.security.utils.AdminAccount weblogic welcome1 .

This will create file  DefaultAuthenticatorInit.ldift in directory from which you executed this command .

 

4. Rename the original file DefaultAuthenticatormyrealmInit.ldift in the $DOMAIN_HOME/security/ (for example, rename to ORIG_DefaultAuthenticatormyrealmInit.ldift) and replace it with the new DefaultAuthenticatorInit.ldift generated in step 3

 

5. Rename the data directory under $DOMAIN_HOME/servers/<serverName>/data (for example, rename it to another directory like data.bak – the data directory contains files related to embedded LDAP and role mapping file).

Perform the above for the Admin Server, that is, where <serverName> is AdminServer; and then repeat the step for the managed server(s).

Repeat this step for all managed servers which are part of this domain.

Note: This step will remove all existing users/groups from WebLogic’s embedded LDAP server (recreate these users/groups in setp8)

 

6. Recreate the boot.properites file under $DOMAIN_HOME/servers/<serverName>/security with username and password created in step 3 above.  The contents of the file will be like this …
USERNAME=weblogic
PASSWORD=welcome1

As before, perform the above for the Admin Server, that is, where <serverName> is AdminServer; and then repeat the step for the managed server(s).

Repeat this step for all managed servers which are part of this domain.

 

7. Start (or restart) Admin Server and test if you can login to WebLogic Console using the new username and password. Access the WebLogic Console from a URL similar to this: http://<server>:7001/console

 

8. Recreate any users/groups (which were part of default authenticator prior to new super user creation) or import existing users (from WebLogic’s servers embedded LDAP server backup)

Advertisements

One Response to Forgot weblogic user password – How to reset the weblogic user

  1. elcharter says:

    Reblogged this on BI Tips & Tricks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: