I forgot the Glassfish3 master-password, how can i reset it?

Please follow the below steps:

  1. Stop the domain
  2. Back up the master password file
  3. Create a new domain and save the master password:
    asadmin create-domain --savemasterpassword domain2
  4. Remember the password :-)
  5. Copy the newly created masterpassword file over the old one
  6. Delete the newly created domain:
    asadmin delete-domain domain2

FYI, now you should also know why you want to protect the master password file using file permissions :-)


There is a backup password that can be used to access the administrator panel even if you've forgotten the main one.

If you navigate to glassfish\domains\domain1\config\ you will find a file called local-password.

The contents of that file can be used as a password to log in to the control panel as admin.