Recently one of our client forgot weblogic username and password, and the weblogic is in production mode. He was not having boot.properties set to start weblogic automatically, so my task is
1. Reset the admin server password
2. Create boot.properties, so client not need to enter passoword every time they start weblogic.

About Setup
Client was having single domain, for our refrence purpose we will call it techienote.
Our ORACLE or MIDDLEWARE HOME is at /app/Oracle/Middleware
Weblogic version 10.3.5.0

PROCESS
NOTE : All the weblogic releated services should be shut.

1.Setting Enviournment

cd $ORACLE_HOME/user_projects/domains/techienote/bin
source setDomainEnv.sh

2.Change to security directory and rename DefaultAuthenticatorInit.ldift file.

cd $ORACLE_HOME/user_projects/domains/techienote/security
mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift.bak

3.Create DefaultAuthenticatorInit.ldift file in security folder

cd $ORACLE_HOME/user_projects/domains/techienote/security
java weblogic.security.utils.AdminAccount weblogic admin .

Remember there is DOT at the end of command it indicated generate DefaultAuthenticatorInit.ldift in current directory,
syntax of the command is
java weblogic.security.utils.AdminAccount .
So our username is weblogic and password is admin

4.Rename ldap directory

cd $ORACLE_HOME/user_projects/domains/YourDomainName/servers/AdminServer/data/
mv ldap ldap.bak
mkdir ldap

5.If your are having boot.properties rename it first

cd $ORACLE_HOME/user_projects/domains/techienote/servers/AdminServer/security
mv boot.properties boot.properties.bak

6.Start the weblogic server

cd $ORACLE_HOME/user_projects/domains/techienote/bin
./startWebLogic.sh

7.Now our weblogic server should start, so now we need to create boot.properties to start Weblogic without entering user name and password.

cd $ORACLE_HOME/user_projects/domains/techienote/servers/AdminServer/
mkdir security
cd $ORACLE_HOME/user_projects/domains/techienote/servers/AdminServer/security/
echo "username=weblogic" >> boot.properties
echo "password=admin" >> boot.properties
Resetting lost password of Admin server in Weblogic

2 thoughts on “Resetting lost password of Admin server in Weblogic

  • November 2, 2012 at 11:34 pm
    Permalink

    When I tried java weblogic.security.utils.AdminAccount weblogic admin .,it gave me below error

    java.lang.ClassNotFoundException: weblogic.security.utils.AdminAccount
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    Reply
    • November 3, 2012 at 10:33 am
      Permalink

      I think so you have not set the environment. Kindly do following
      Setting Enviournment

      cd $ORACLE_HOME/user_projects/domains/domain_name/bin
      source setDomainEnv.sh

      Also let me know the weblogic version

      Reply

Leave a Reply

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

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google