blob: 7354e614bf2208d66fcb12827abd65ad9369e867 [file] [log] [blame]
type=page
status=published
title=change-admin-password
next=change-master-broker.html
prev=backup-domain.html
~~~~~~
= change-admin-password
[[change-admin-password-1]][[GSRFM00004]][[change-admin-password]]
== change-admin-password
Changes the administrator password
[[sthref45]]
=== Synopsis
[source]
----
asadmin [asadmin-options] change-admin-password [--help]
[--domaindir domain-root-dir [--domain_name domain-name]]
----
[[sthref46]]
=== 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
link:create-file-user.html#create-file-user-1[`create-file-user`(1)] or
the Administration Console. After creating this user account, remove the
anonymous user to restrict access to {productName} settings.
If more than one administrator is configured for {productName}, 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.
[[sthref47]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--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.
[[sthref48]]
=== Examples
[[GSRFM447]][[sthref49]]
==== Example 1   Changing the Administrator Password For a Single User in Multimode
[source]
----
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.
----
[[GSRFM448]][[sthref50]]
==== Example 2   Changing the Administrator Password For a Single User in Single Mode
[source]
----
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.
----
[[sthref51]]
=== Exit Status
0::
command executed successfully
1::
command failed
[[sthref52]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-file-user.html#create-file-user-1[`create-file-user`(1)],
link:delete-password-alias.html#delete-password-alias-1[`delete-password-alias`(1)],
link:list-password-aliases.html#list-password-aliases-1[`list-password-aliases`(1)],
link:update-password-alias.html#update-password-alias-1[`update-password-alias`(1)]