Generating the Adminstrator password for WLS server
Steps:
1: open a command prompt.
2: go to the %BEA_HOME%/user_projects/domains/base_domain/bin dir
cd %BEA_HOME%/user_projects/domains/base_domain/bin
3: run the setDomainEnv.cmd file.
4: This will bring you to base_domain dir. Now run the following command:
java weblogic.security.utils.AdminAccount sandeep sandeep11 .
Do not forget to use the last “.” which is going to inform the utility to create the DefaultAuthenticatorInit.ldift in the Domain_Home dir.
5: Also try to use a password with atleast 8 chars and with at least one numeric digit.
6: then rename the DefaultAuthenticatorInit.ldift that is already present in the %Domain_Home %/security dir to
DefaultAuthenticatorInit_old.ldift and place the newly generated DefaultAuthenticatorInit.ldift file in the %Domain_Home %/security dir.
7: Also delete the %Domain_Home %/servers/AdminServer/security/boot.properties file.
8: Rename the %Domain_Home %/servers/AdminServer/data/ldap/DefaultAuthenticatormyrealmInit.initialized file to DefaultAuthenticatormyrealmInit_old.initialized
9: Now you can try to start the Admin Server with through the command prompt using startWeblogic.cmd file.
3 Comments
Hi sandeep,
I trying to reset the admin server password
so…tried doing it same in unix but faced this error …please let me know
Exception in thread “main” java.lang.NoClassDefFoundError: weblogic/security/utils/AdminAccount
Caused by: java.lang.ClassNotFoundException: weblogic.security.utils.AdminAccount
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: weblogic.security.utils.AdminAccount. Program will exit.
It clearly means that the environment variable was not set properly.
Check the classpath : echo $CLASSPATH —- weblogic.jar should be there in the classpath.
did you executed the setDomainEnv.sh on the shell prompt ?
. ./setDomainEnv.sh
Do not forget to use the trailing “.” while running the setDomainEnv.sh.
Thanks for the info. I inadvertently removed the admin user from the administrators group in myrealm and the server wouldn’t start. Your instructions have helped tremendously!