Changing the default Master Password for a domain in Glassfish/Sun Java System Application Server
If someone wants to change the default master password for a particular domain in Glassfish/Sun Java System Application server , they can do it easily using the Sun Java System Application server's asadmin command "change-master-password".
Here is the syntax of this command:
Usage: change-master-password [--terse=false] [--echo=false] [--interactive=true] [--savemasterpassword=false] [--domaindir domain_directory] domain_name
Example:
asadmin> change-master-password domain1
Please enter the master password> Here you enter the old master password
Please enter the new master password> Enter the new master password
Please enter the new master password again> Enter the new master password again.
Master password changed for domain1.
Now the master password for the domain is changed, and all other future admin operations on that particular instance prompts for the new master password, or takes from the --passwordfile option.
Posted at 12:00PM Apr 24, 2006 by shaline in Sun |
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
Posted at 12:00PM Apr 24, 2006 by shaline in Sun |