Wednesday, October 13, 2010

How to recover/reset Admin user password

1. Shutdown your weblogic instance if its running

 2. Set your environment variables using setDomainEnv.sh:

    $<domain>/bin/
setDomainEnv.sh

3 .Run the following commands:

     $ cd  <DOMAIN>/security


 java -classpath /opt/appsvr/product/wls_103/wlserver_10.3/server/lib/weblogic.jar   
 weblogic.security.utils.AdminAccount  weblogic1  webl0gic1  .

    Where new user is weblogic1 & password is webl0gic1

     [ Note: Don't forget the period "." at the end of the above command ]

      [ Note: After running the above command, the file "DefaultAuthenticatorInit.ldift" gets updated. ]

 4. Delete the following file from "ldap" folder:

     $
cd <DOMAIN>/servers/<ADMIN_SERVER>/data/ldap

     $
rm DefaultAuthenticatormyrealmInit.initialized

     [ Note: A new file will be automatically created when weblogic is started. ]

5.  Startup weblogic server using the newly created "weblogic1" account and provide username and password  
     during startup

    Enter username to boot WebLogic server: adminuser1
    Enter password to boot WebLogic server: webl0gic

   ( in development mode it will not ask you for username/password )

6.  Logon to /console with the new administrative user - "weblogic1/webl0gic1" (not "weblogic")

7.  Now either use this as admin user or you can reset password of earlier user weblogic.

No comments:

Post a Comment