Monday, May 9, 2016

Change Password in Oracle WebLogic

Have you ever forgot the password of WebLogic domain? It is a recurring question I receive now and again: "I’ve forgot my password, how can I reset the AdminServer password in WebLogic domain? Is there a way I can change the password of WebLogic Domain?" For security policy, the administrators need to change regularly the WebLogic password. No problem! Let's discuss how can you reset the WebLogic password from the command line.

1.     Shut down the WebLogic domain, the managed servers, Admin Server and Node Manager.
2.     Set the following environment variables in the command prompt (cmd) to help you navigate easily, in my case for Windows O/S:
o    set MW_HOME=\Oracle\Middleware\Oracle_Home
o    set DOMAIN_HOME=%MW_HOME%\user_projects\domains\base_domain
NB: If you are on Linux O/S, use export instead of set and $MW_HOME instead of %MW_HOME%
3.      Rename the data folder under the AdminServer of the domain to old_data, this is the path:%DOMAIN_HOME%\servers\AdminServer\data
4.      In the same command prompt that you opened earlier, set the environment variable of the domain by calling: %DOMAIN_HOME%\bin\setDomainEnv.cmd or ./setDomainEnv.sh in Linux.
5.     In the same command prompt, change directory to security folder: cd %DOMAIN_HOME%\security
6.     Inside the %DOMAIN_HOME%\security directory, move the file "DefaultAuthenticatorInit.ldift" to "%DOMAIN_HOME%\security\old\" In the next step, the command that we are going to run will create a new file “DefaultAuthenticatorInit.ldift” in the security folder
7.     Run the following command to reset or change admin password:
  java weblogic.security.utils.AdminAccount  weblogic welcome123 .
o    NB: "weblogic" is user name and "welcome123" is the new password which we need to set. 
o    NB: The DOT at the end of the above command represents the current directory. A new "DefaultAuthenticatorInit.ldift" file will be created in the current directory when you execute the command.
8.     Update the "boot.properties" file under the directory %DOMAIN_HOME%\servers\AdminServer\security\with your username and the new password.
9.     Now start the admin server using the new credentials from %DOMAIN_HOME%\bin\startWeblogic.cmdin Windows or ./startWeblogic.sh in Linux.
10.   Once the AdminServer started, login into the Admin console using the username and the new password


No comments:

Post a Comment

Featured Post

Generate single index on table 

Transaction tables such as F0911, F4111 etc hold a huge amount of data probably a third of petabyte. Generating indexes on such tables (th...

Popular Posts