Monday Apr 24, 2006

Creating a domain with a different Master Password other than default Master Password in Glassfish/Sun Java System Appserver

When a domain is created in Sun Java System Application Server 9.0 , it will be created with a default master password called "changeit" . If Someone wants to create a domain with their own master password they could do that easily by having the AS_ADMIN_MASTERPASSWORD property set in the passwordfile passed to the --passwordfile option during domain creation.
Here is the example:
$ /appserver/bin/asadmin create-domain --adminuser j2eeadmin --adminport 4848 --passwordfile /export/j2eepasswordfile mydomain

Here /export/j2eepasswordfile can have the values as follows:

#Here are the passwords for my admin instance mydomain
AS_ADMIN_ADMINPASSWORD=my_secret_admin
AS_ADMIN_MASTERPASSWORD=my_secret_master

Now the domain is created with the admin password as "my_secret_admin" and master password as "my_secret_master". After the domain is created, all other admin operations on that domain prompt for the master password, or take from the --passwordfile option.

Example: $/appserver/bin/asadmin start-domain user j2eeadmin --passwordfile /export/j2eepasswordfile mydomain

Here /export/j2eepasswordfile can have the values as follows
AS_ADMIN_PASSWORD=my_secret_admin
AS_ADMIN_MASTERPASSWORD=my_secret_master

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers