For me creating a new domain and replacing old domain's keyfile with the new one worked.
My glassfish version 2.1.1 and OS is windows server
- stop your glass domain (eg for domain name : domain1)
asadmin stop-domain domain1
- backup .asadminpass (only required if you had savemasterpassword enabled) and admin-keyfile
move /Users/your_username/.asadminpass to .asadminpass_bkup
move {glassfishpath}/domains/domain1/config/admin-keyfile to admin-keyfile_bkup
- create a new domain and fill in the username with what you had in your original domain. probably admin
asadmin create-domain --adminport 4848 domain2
- copy new domain's admin-keyfile to old domain
copy {glassfishpath}/domains/domain2/config/admin-keyfile to {glassfishpath}/domains/domain1/config/admin-keyfile
- Start your server
asadmin start-domain domain1
Voilla now your domain1's password is changed to the password you inserted when creating domain2