The last two recipes of this book will help you in case you have lost your administration password or just in case you want to simply change it. We will begin from the latter one. In order to change the Administrator password:
- Start the Web console and select from the left tree panel Security Realms |[yourrealm] | Users and Groups tab. From there, click on the administrator user (e.g. “weblogic”):
- In the next screen, click on the Passwords tab. Enter the new password and Save.
In order to make this change available when the server starts, you need to edit the boot.properties located at DOMAIN_HOME\servers\AdminServer\security and provide the values used for user/password . The original values should be an encrypted string; however just enter the values as plain text as in the following example:
Save the file. Next time the server will start it, it will pick up the new values from the boot.properties and once the same had been accepted, they will be encrypted again.
If you accidentally lost your administrator password don’t despair. Make sure the Administration server is stopped and that you have set the domain environment:
Now execute the following command (mind to include the “.” at the end of it) which sets a new password for the user “wlsadmin”:
C:\WLS121~1\user_projects\domains\base_domain>java weblogic.security.utils.AdminAccount wlsadmin newAdminPassword.
The above command will create a file called DefaultAuthenticatorInit.ldift in the current directory. Now make a backup copy of the original file DefaultAuthenticatorInit.ldift which is in the security folder of your domain:
C:\WLS121~1\user_projects\domains\base_domain\security>copy DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift.backup
1 file(s) copied.
Next, edit the boot.properties located at DOMAIN_HOME\servers\AdminServer\security and give the values used for user/password. The original values should be an encrypted string; however just enter the values as plain text as in the following example:
Copy the recently created DefaultAuthenticatorInit.ldift to DOMAIN_HOME\security
C:\WLS121~1\user_projects\domains\base_domain\security>copy C:\wls1211_dev\user_projects\domains\base_domain\DefaultAuthenticatorInit.ldift .
Finally, delete the file named DefaultAuthenticatormyrealmInit.initialized located in DOMAIN_HOME\servers\AdminServer\data\ldap
Now restart the server using startWeblogic.cmd/startWeblogic.sh from DOMAIN_HOME