WebLogic account or Password error

Source: Internet
Author: User

If your WebLogic account or password is incorrect, your adminserver cannot be started and you cannot log on to the console, at this time, we need to create a new account and password to manage our console ~

1. Backup

The defaultauthenticatorinit. ldift file under % domain_home %/security and the boot. properties file under the % domain_home % servers/adminserver/security directory. If the following steps fail, the file can be restored.

[Zhuying @ sor-sys Security] $ pwd
/Home/zhuying/opt/BEA/user_projects/domains/test_domain/security
[Zhuying @ sor-sys Security] $ CP defaultauthenticatorinit. ldift defaultauthenticatorinit. ldift. Bak

2. run Java-CP $ bea_home/wlserver_10.3/Server/lib/weblogic. Jar weblogic. Security. utils. adminaccount <New User Name> <new password>.(Note that the last vertex has a space before the vertex.)

[Zhuying @ sor-sys bin] $ pwd
/Home/zhuying/opt/BEA/jdk160_05/bin
[Zhuying @ sor-sys bin] $. /Java/home/zhuying/opt/BEA/wlserver_10.3/Server/lib/weblogic. jar weblogic. security. utils. adminaccount adminzy *******.

3. A new defaultauthenticatorinit. ldift file will be generated in the current directory after execution, and the original % domain_home %/security/defaultauthenticatorinit. ldift file will be replaced.

[Zhuying @ sor-sys bin] $ pwd
/Home/zhuying/opt/BEA/jdk160_05/bin

[Zhuying @ sor-sys bin] $ MV defaultauthenticatorinit. ldift/home/zhuying/opt/BEA/user_projects/domains/test_domain/security/

4. Delete the initialization Status File defaultauthenticatormyrealminit. initialized from the % domain_home %/servers/adminserver/data/ldap/subdirectory and update boot. properties.

[Zhuying @ sor-sys LDAP] $ RM defaultauthenticatormyrealminit. initialized
[Zhuying @ sor-sys LDAP] $ pwd
/Home/zhuying/opt/BEA/user_projects/domains/test_domain/servers/admin-test/data/ldap

Format of file boot. properties:

Username = User Name
Password = Password

5. Run startweblogic. Sh. during startup, you will be asked to enter the username and password, and the new username and password.

6. log on to the management console with the new username and password, click "myrealm" in "security field", find the user in the user and group, change the password, and save it, in the future, you can continue to use the original user name and password to log on.

If you want to use the original account, you need to restore the original defaultauthenticatorinit. ldift file and delete the initialization Status File ~

[Zhuying @ sor-sys bin] $ pwd

[Zhuying @ sor-sys
Bin] $/home/zhuying/opt/BEA/user_projects/domains/test_domain/security/

[Zhuying @ sor-sys bin] $ MV defaultauthenticatorinit. ldift. bakdefaauthauthenticatorinit. ldift

Delete the initialization status file:
[Zhuying @ sor-sys bin] $ CD/home/zhuying/opt/BEA/user_projects/domains/test_domain/servers/admin-test/data/ldap

[Zhuying @ sor-sys
LDAP] $ RM defaultauthenticatormyrealminit. initialized

7. Restart the server. You do not need to enter the user name and password. After the server is started successfully, WebLogic encrypts the User Password

Note:

WebLogic also provides a simple command, but this command is positive, not reverse, that is, from the password to the encrypted string rather than decryption. You need to log on to the console with the password, and then compare whether the encrypted string is the value in Boot. properties. The command is used as follows:

First, enter the domain, execute setdomainenv. Sh, get the environment variable settings, enter the domain directory, and run:

Java weblogic. Security. Encrypt ******** [*********** indicates your console password]

Theoretically, the encrypted string should be displayed, but the system prompts the following error ~

Exception in thread "Main" Java. Lang. noclassdeffounderror: WebLogic/security/Encrypt
Caused by: Java. Lang. classnotfoundexception: weblogic. Security. Encrypt
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
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 java. Lang. classloader. loadclassinternal (classloader. Java: 319)

Next we will use another method, without executing setdomainenv. Sh, and directly running:

[Zhuying @ sor-sys bin] $ pwd
/Home/zhuying/opt/BEA/jdk160_05/bin

[Zhuying @ sor-sys bin] $. /Java-CP/home/zhuying/opt/BEA/wlserver_10.3/Server/lib/weblogic. jar-dweblogic. rootdirectory =/home/zhuying/opt/BEA/user_projects/domains/zy_domain/weblogic. security. encrypt 12345678

{3DES} C + sk1 + y8rqz + awunbzqmvw =

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.