Sun Java System Application Server Platform Edition 9 Administration Guide

Executing Local Admin CLI Commands without Admin Password

Sun Java System Application Server supports three local commands for which the administrator password need not be specified in clear text anymore. Instead the admin password can be defined as an alias in the passwordfile. The asadmin command invokes this passwordfile through "--passwordfile" option. This feature is also useful when a domain or a server has to be automatically restarted. The commands currently supported by this feature are start-domain, start-appserv, and start-node-agent.

ProcedureTo create the password alias

  1. Ensure that the domain is running.

  2. Create the alias for the admin user. To do this, from the directory where the domain.xml file resides (install_dir/domains/domain_dir/config by default), run the following asadmin command:

    create-password-alias --port 4848 --user admin --password adminadmin --aliaspassword adminadmin adminalias

  3. Insert the alias in a passwordfile

    $cat passwordfile

    AS_ADMIN_PASSWORD=${ALIAS=adminalias}


Example 20–1 for start-domain

Here's an example of the start-domain command used with the password alias.

asadmin start-domain --user admin --passwordfile passwordfile domain1