Skip Headers
Oracle GlassFish Server Reference Manual
Release 3.1.2

Part Number E24938-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

change-admin-password

changes the administrator password

Synopsis

change-admin-password [--help]
[--domaindir domain-root-dir [--domain_name domain-name]]

Description

The change-admin-password subcommand modifies the administrator password. The change-admin-password subcommand is interactive because the subcommand prompts the user for the old administrator password, for the new administrator password, and for confirmation of the new administrator password. The new password must contain at least 8 characters.

If the only user is an anonymous user without a password, this subcommand fails.

If a blank password is provided, this subcommand fails if secure administration is enabled.

For security purposes, create a password-protected user account with administrator privileges. To create this account, use the create-file-user(1) or the Administration Console. After creating this user account, remove the anonymous user to restrict access to GlassFish Server settings.

If more than one administrator is configured for GlassFish Server, you must run the asadmin command with the --user option to change the password for that user. For more information, see the examples in this help page.

This subcommand is supported in local mode and remote mode. If the --domaindir or --domain_name option is specified, the change-admin-password subcommand operates in local mode. If neither option is specified, the change-admin-password subcommand first attempts to operate in remote mode. If neither option is specified and the DAS is not running, the change-admin-password subcommand operates in local mode, using the default values for the --domaindir and --domain_name options.

Options

--help
-?

Displays the help text for the subcommand.

--domaindir

Specifies the parent directory of the domain specified in the --domain_name option. When this option is used, the change-admin-password subcommand operates in local mode.

--domain_name

Specifies the domain of the admin user.

This option is not required if the directory specified by the --domaindir option contains only one domain.

Examples

Example 1   Changing the Administrator Password For a Single User in Multimode
asadmin --user admin
asadmin> change-admin-password
Please enter the old admin password>
Please enter the new admin password>
Please enter the new admin password again>
Command change-admin-password executed successfully.
Example 2   Changing the Administrator Password For a Single User in Single Mode
asadmin --user admin change-admin-password
Please enter the old admin password>
Please enter the new admin password>
Please enter the new admin password again>
Command change-admin-password executed successfully.

Exit Status

0

command executed successfully

1

command failed

See Also

create-file-user(1), delete-password-alias(1), list-password-aliases(1), update-password-alias(1)

asadmin(1M)