Recovering Weblogic Admin Console Password

Hi frienz,

Following are the steps to recover your Weblogic Admin Console password:

Steps to use the java file:

1) go to BEA-Home>User_Projects>domains>domain_name

2) take a back up of SerializedSystemIni.dat, boot.properties file.

3) set the java classpath so that you run the java file.

4) compile and run the java class file.

5) in the command prompt you would be seeing the output displaying the user name and password.

import weblogic.security.internal.BootProperties;

public class RecoverPassword {

public static void main(String[] args) {

BootProperties.load(null, false);  // tested with 8.1

// BootProperties.load(“fullPathToBootPropertiesFile”, false); // tested with 10.3

BootProperties bootp = BootProperties.getBootProperties();

System.out.println(

“#####################[” +

bootp.getOneClient() + “/” + bootp.getTwoClient() +

“]###################”);

}

}

All The Best!!

36 comments

  1. Hi there are some error in you java code.for example “# and ”)

    after i set the classpath. when i compile ,there are some errors happened, can u help me?

    RecoverPassword.java:16: cannot resolve symbol
    symbol : method getOneClient ()
    location: class weblogic.security.internal.BootProperties
    bootp.getOneClient() + “/” + bootp.getTwoClient() +
    ^
    RecoverPassword.java:16: cannot resolve symbol
    symbol : method getTwoClient ()
    location: class weblogic.security.internal.BootProperties
    bootp.getOneClient() + “/” + bootp.getTwoClient() +
    ^
    2 errors

    1. Hi,

      1) Could I request you to confirm if you are using the following same program:
      import weblogic.security.internal.BootProperties;

      public class RecoverPassword {

      public static void main(String[] args) {
      BootProperties.load(null, false); // tested with 8.1
      // BootProperties.load(“fullPathToBootPropertiesFile”, false); // tested with 10.3
      BootProperties bootp = BootProperties.getBootProperties();

      System.out.println(“#####################[“+bootp.getOneClient()+”/”+bootp.getTwoClient()+”]###################”);
      }

      }

      2) can u run the class path script present inside your server bin folder and confirm me back??

  2. hi

    1 i use the following program 2 i run the setEnv.cmd in my domain dir G:\BEA_WebLogic\bea\user_projects\domains\mydomain
    is there any wrong ,pls tell me ? btw i am from china,nice to meet u.
    import weblogic.security.internal.BootProperties;
    public class RecoverPassword {

    public static void main(String[] args) {
    // tested with 8.1
    BootProperties.load(null, false);
    // tested with 10.3
    // BootProperties.load(“fullPathToBootPropertiesFile”, false);

    BootProperties bootp = BootProperties.getBootProperties();

    System.out.println(

    “#####################[” +

    bootp.getOneClient() + “/” + bootp.getTwoClient() +

    “]###################”);
    }
    }

  3. Hi Shankar
    I am so surprise that you reply to me by email,you should deal with your work first ,if you have free time ,you could request to me . This issue is
    not urgent to me ,also ,i am a WebLogic Fans .i love this technology. in china also plenty of fans study it ,we have our own website, if you are
    interesting at it, you can visit the http://bbs.weblogicfans.net there are all chinese content ,hehe .normaly we communicate in QQ group .welcome u to discuss with us if you would like to do that ..i also know some of your chinese oracle colleagues, we r offten communicate, ok that is all.

    Best regards.
    My MSN: rechen_ai@hotmail.com
    i can not send email to u some wrong about the mail.163.com ,so i only to leave message here

  4. Hi Shankar,

    As you mentioned in step4 what would be the java class file that we need to run.
    Will it be same in all environments.
    Please clarify.

    I was looking for many solutions how to recover password.
    This answer would be great help.

    thanks
    Neelima

    1. Hi Neelima,

      The java Class file that needs we need to run is: RecoverPassword.java (comment and uncommenting depends on weblogic version we are using)

      This class remains the same irrespective of the environment.

      Thanks and Regards,
      shankar!!

  5. Hi

    can you please help me.I am getting below error while compiling

    javac CheckPass.java
    CheckPass.java:3: class RecoverPassword is public, should be declared in a file named RecoverPassword.java
    public class RecoverPassword {
    ^
    CheckPass.java:1: package weblogic.security.internal does not exist
    import weblogic.security.internal.BootProperties;
    ^
    CheckPass.java:7: cannot find symbol
    symbol : variable BootProperties
    location: class RecoverPassword
    BootProperties.load(null, false); // tested with 8.1
    ^
    CheckPass.java:11: cannot find symbol
    symbol : class BootProperties
    location: class RecoverPassword
    BootProperties bootp = BootProperties.getBootProperties();
    ^
    CheckPass.java:11: cannot find symbol
    symbol : variable BootProperties
    location: class RecoverPassword
    BootProperties bootp = BootProperties.getBootProperties();
    ^
    5 errors

    1. 1. The file name and the public class name should be same.

      save the class as RecoverPassword.java

      2. Set the classpath, before executing the java program.

      Run the setDomainEnv script from the /bin folder.

      Later on follow the steps described in the post.

      Cheers,
      Anandraj

  6. hi.. i tried to compile the PasswordRecovery.java file but i am getting error::
    Class names, ‘boot.properties’ , are only accepted if annotation processing is explicitly requested..

    help me to resolve this error..thanku

    1. Hi Subramanyam,

      Could u confirm the boot.properties is present inside the Domain Home directory and could u chck if it got corrupted??

  7. Hello,

    Solution don’t work with WLS 10.3.4.
    Error :

    I thnik that the AES algorithm is not supported, it’s it?

    Regards,

    1. Hi Raju,

      Kindly follow the steps mentioned in the article.
      If you face any issues do let us know.

      Cheers!
      Faisal

  8. Hi, I can compile the class, but i can’t run the class

    c:\Oracle\Middleware\user_projects\domains\base_domain>java RecoverPassword.class
    Exception in thread “main” java.lang.NoClassDefFoundError: RecoverPassword/class
    Caused by: java.lang.ClassNotFoundException: RecoverPassword.class
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    Could not find the main class: RecoverPassword.class. Program will exit.

    please helpme! :]

  9. hi shankar
    i have weblogic as my admin uname i deleted it now m unable to acces my obiee wb pages could u plz help me to solve this

    1. Hi Bhavya,

      Do you have a backup of the ldap server?
      That is the only way to get the old users back….

      Thanks,
      Faisal

  10. Hi There
    Good Day

    I Developed one tool to decrypt the Weblogic encrypted data , which was developed in Java Swings using Eclipse IDE . The tool is working fine when i run the Code using
    1) Eclipse IDE
    2) Executing the Main class after executing the setWLSEnv.cmd C:\Bea10.3\wlserver_10.3\server\bin

    But if i try to execute the Main class without executing the setWLSEnv.cmd. i am facing a following Exception

    *******************************************
    Exception in thread “AWT-EventQueue-0” java.lang.NoClassDefFoundError: weblogic/security/internal/SerializedSyste
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at pwdFrame$3.actionPerformed(pwdFrame.java:208)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6041)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3266)
    at java.awt.Component.processEvent(Component.java:5806)
    at java.awt.Container.processEvent(Container.java:2059)
    at java.awt.Component.dispatchEventImpl(Component.java:4413)
    at java.awt.Container.dispatchEventImpl(Container.java:2118)
    at java.awt.Component.dispatchEvent(Component.java:4244)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2441)
    at java.awt.Component.dispatchEvent(Component.java:4244)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:1
    ****************************************************

    Can anyone Plz help to fix this issue. By specifying where i can get/How can i fix the : weblogic/security/internal/SerializedSystemIniException : weblogic/utils/NestedRuntimeException

    1. Hi Vis,

      Are you passing the location of SerializedSystemIni.dat file?
      Can you share the script that you have written?

      Thanks

  11. Hi ,I m getting ClassNotFoundException for running the class file as mentioned above
    C:\Oracle\Middleware\user_projects\domains\sathesh_domain>java RecoverPassword
    Exception in thread “main” java.lang.NoClassDefFoundError: RecoverPassword
    Caused by: java.lang.ClassNotFoundException: RecoverPassword
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: RecoverPassword. Program will exit.

    Can u pls help ??

    1. Hi Satheesh,

      The classpath is not set. Add the current directory to the classpath.

      Thanks,
      Faisal

  12. Hi

    I m getting “Exception in thread ‘main’ java.lang,nullpointerException at RecoverPassword.main(RecoverPassword.java:13”)
    Line no 13 is “System.out.println(bootp.getOneClient() + “/” + bootp.getTwoClient());”

    I will really appreciate your help.

    Thanks

Comments are closed.