Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide

- Previous: Tools for Managing Security
- Next: Protecting files with encoded passwords

## To encrypt a password in domain.xml

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.
       default_JMS_host.admin-password='${ALIAS=jms-password}'

3. Restart the Application Server for the relevant domain.

- Previous: Tools for Managing Security
- Next: Protecting files with encoded passwords

- © 2010, Oracle Corporation and/or its affiliates