change-master-password command in Glassfish 3.1
By user12615559 on Feb 28, 2011
Glassfish 3.1 has released!! You can find more information at this link.
Today we will cover one of the commands of 3.1 change-master-password and some changes we made with respect to 2.1.
The master password is the password that is used to encrypt the DAS (and instances) keystore. Therefore the DAS and associated server instances need the password to open the keystore at startup.The master password is the same for the DAS and all instances in the domain. The default master password is "changeit". The master password can be saved in a master-password file:
This is the location of the master-password file
- DAS: domains/domainname/master-password
- Instance: nodes/node-name/agent/master-password
A master password can be set during domain or instance creation by entering it interactively. It is saved to the master-password file if the --savemasterpassword option is used. This is supported by:
A master password is provided during domain or instance startup via the master-password file or by entering it interactively. This is supported by:
The change-master-password command is a local command which is used to change the master-password .The master-password may be changed on the DAS by running change-master-password. The DAS must be down to run this command. change-master-password supports the --savemasterpassword option so that the master password can be saved in a master-password file. The same command can be used to change the master-password file on an instance
Options for change-master-password
This option indicates whether the master password should be written to the file system. This is necessary so that start-domain and start-local-instance can start the server without having to prompt the user for password.Defaults to false
NOTE: if savemasterpassword is not set, the master password file, if it exists, will be deleted.
This option is used when changing the master password for a node. You can specify a nodedir which is your <gf>/nodes.
If the option is omitted, then it defaults to <installdir>/glassfish/nodes. Omitting it doesn't cause the change to be applied to the whole domain
This option is used when changing the master password for the DAS. Typically this is <gf>/domains. It is an error to specify both domaindir and nodedir together.
This is the domain name whose password is to be changed.
This is the name of the node agent whose password is to be changed.
For the first instance created on a node, you can't start it until the master password is set
and saved to the file.
From that point on you should be able to create new instances and start
existing instances on the node.
Please refer to the following screencast for more information .