Sun GlassFish Enterprise Server 2.1 Administration Guide

Encrypting a Password in the domain.xml File

To encrypt a password in the domain.xml file. Follow these steps:

  1. From the directory where the domain.xml file resides (domain-dir/config by default), run the following asadmin command:

    asadmin create-password-alias --user admin alias-name

    For example,

    asadmin create-password-alias --user admin jms-password

    A password prompt appears (admin in this case). Refer to the man pages for the create-password-alias, list-password-aliases, delete-password-alias commands for more information.

  2. Remove and replace the password in domain.xml. This is accomplished using the asadmin set command. An example of using the set command for this purpose is as follows:

    asadmin set --user admin server.jms-service.jms-host.

    Note –

    Enclose the alias password in single quotes as shown in the example.

  3. Restart the Enterprise Server for the relevant domain.