Managing boot.properties in weblogic

Oracle Weblogic Server

When starting weblogic server up in Production mode, the first time it will fail, the server will not startup if the boot.properties in weblogic is not present. However, WebLogic will ask on the console for the user/password for the admin user. You can also specify the user/password in the script/command line. This is because the startup requires some security/identity parameters, stored in a file called boot.properties.

This will give an entry in the logs. This file contains the username and password of the WebLogic Admin user,and is stored in the/servers/AdminServer/security.  However, the first time you startup, this directory has not been created yet, so you will have to accept the first time startup failure. After the failure you create the directory security under/servers/AdminServer, and create a file named boot.properties. Of course, you also could perform this action before starting.

Content of the boot.properties in weblogic:

username=<name of WebLogic Admin ( usually weblogic)>
password=<password>

• Now save this file and issue the startup sequence again. The contents of the boot.properties file will now be encrypted, upon successful startup. Using java weblogic.Server command to create a Boot Identity file Besides creating the file on the OS, you can also create it with the java weblogic.Server command. For example, the following command starts an Administration Server named myAdminServer and creates a boot identity file:

java -Dweblogic.management.username=weblogic -Dweblogic.management.password=welcome1 -Dweblogic.system.StoreBootIdentity=true -Dweblogic.Name=myAdminServer weblogic.Server

Alternative to boot.properties: In case you don’t want to use the boot.properties in weblogic or enter the username/password during server startup, and if security is not a concern, you can add the following values in the server startup script.

-Dweblogic.management.username=username 
-Dweblogic.management.password=password

Like in startWeblogic.sh:

-Dweblogic.management.username=<weblogic username>
-Dweblogic.management.password=<weblogic password>

However, keeping clear-text passwords is not recommended. You can create the boot.properties in weblogic by keeping the following values in the startup script:

-Dweblogic.management.username=username
 -Dweblogic.management.password=password
 -Dweblogic.system.StoreBootIdentity=true

This will create a boot.properties file under the AdminServer/security directory.   Keeping boot.properties at user-defined location: The boot.properties file can be placed at a user-defined location by keeping the following flag in startup script:

-Dweblogic.system.BootIdentityFile=filename

With this option, boot.properties file can be renamed with some other name such as:

-Dweblogic.system.BootIdentityFile=myboot.txt

After restarting the AdminServer, it had encrypted my password and username in myboot.txt file. In case you want the boot.properties file to be removed, the following option can be used:

-Dweblogic.system.RemoveBootIdentity=true

This can be used even when you have specified a custom boot.properties file. If you have specified both the options:

-Dweblogic.system.BootIdentityFile=myboot.txt
-Dweblogic.system.RemoveBootIdentity=true

then after a start of Admin Server, myboot.txt will be deleted—just in case you are not sure what is Admin Server username and password.

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply