I forgot the Glassfish3 master-password, how can i reset it?
Please follow the below steps:
- Stop the domain
- Back up the master password file
- Create a new domain and save the master password:
asadmin create-domain --savemasterpassword domain2 - Remember the password :-)
- Copy the newly created masterpassword file over the old one
- 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.