Use the change-admin-password subcommand in remote mode to change the administration password. The default administration password is admin. You are prompted for the old and new admin passwords, with confirmation.
If you accepted the default admin user with no password during zip installation, you can add a password to this user. If there is a single user called admin that does not have a password, you are not prompted for login information. Any other situation requires login.
Encrypting the admin password is strongly encouraged.
If you want to change the admin password before creating an alias for the password (encrypting), you can use the set subcommand with syntax similar to the following:
asadmin set --user admin server.jms-service.jms-host.default_JMS_host.admin-password= new_pwd
Ensure that the server is running.
Remote subcommands require a running server.
Change the admin password by using the change-admin-password(1) subcommand.
Enter the old and new admin passwords when prompted.
Restart GlassFish Server.
See To Restart a Domain.
This example changes the admin password for user anonymous from adminadmin to newadmin:
asadmin> change-admin-password --user anonymous
You are prompted to enter the old and the new admin passwords:
Enter admin password>adminadmin Enter new admin password>newadmin Enter new admin password again>newadmin
Information similar to the following is displayed:
Command change-admin-password executed successfully.
You can also view the full syntax and options of the subcommand by typing asadmin help change-admin-password at the command line.