Friday, October 28, 2011

Start WebLogic’s Managed Server without Username and Password manually

After you installed Fusion Middleware products like WebCenter, UCM, SOA etc you have plenty of Managed Servers (MS) and you have to enter username and password when you start each Managed Server (WC_Spaces, UCM_server1, IBR_server1, WC_Portlet, WC_Utilities, BAM_server1 etc) from the command line.  To make it automatic so that you don’t need to enter username and password. Follow the following steps:-

Apply to all the managed servers (Unsecured and simple way)

If you want that all my Managed Servers (MS) will not prompt for username and password then this approach is for you. In this approach, you just need to change one file and all the MSs will not prompt you for username and password without doing any change in individual MS. Follow the following instructions:-
1.       Go to bin of weblogic domain. In my case, following is the domain path:- <Middleware-Home>\user_projects\domains\<doman>\bin i.e. C:\Oracle\Middleware\user_projects\domains\wc_domain\bin
2.       Open the startManagedWebLogic.cmd in any text editor
3.       Set the following two variables with your weblogic admin user and its password
Set WLS_USER=<Admin-User-Name>
Set WLS_PW=<Admin-User-Password>
4.       Save the file and now start your MS from the command line.
startManagedWeblogic <MS-Name> <Admin-Server-IP:Port>
i.e. startManagedWeblogic WC_Spaces http://127.0.0.1:7001
If everything is ok then it should not prompt you for username and password.
Pls note that username and password will remain unencrypted.

Apply to individual MS changes (Secured and recommended way)

If you want to go with secured way and want to configure few servers that will run without asking for username and password then you need to go with this approach.
1.       (First time only). If you not started your MS before, you need to start it once from the command line so that it create required directories inside <Middleware-Home>\user_projects\domains\<domain> \servers\<MS-Name> i.e. C:\Oracle\Middleware\user_projects\domains\wc_domain\servers\UCM_server1
2.       Once started successfully, shutdown it.
3.       Create a security folder  in <MS-Name> folder
4.       Copy the boot.properties file from <MiddlewareHome>\user_projects\domains\wc_domain\servers\AdminServer and past it into newly created security folder.
Pls note that you can also create a boot.properties, just open any text editor like notepad and enter the following content:-
username=weblogic
password=welcome1

Don’t worry about plain text username and password. Once you start your MS, username and password will be encrypted with AES and will remain encrypted.