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

I forgot the master password of my Glassfish 3.1.2.2. Is there any way to reset it? I spent a lot of time looking for googling, but I did not find a suitable answer.

+8
glassfish glassfish-3
source share
4 answers

Please follow these steps:

  • Stop domain
  • Backing up the master password file
  • Create a new domain and save the master password:
    asadmin create-domain --savemasterpassword domain2
  • Remember the password :-)
  • Copy the created masterpassword file over the old
  • 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 :-)

+11
source share

There is a backup password that can be used to access the admin panel, even if you forgot the main version.

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

The contents of this file can be used as a password to enter the control panel as an administrator.

+12
source share

This was a big problem for me after inheriting a test virtual machine from a colleague who left the company. I did not want to risk creating a new domain as described above, and I tried to use the contents of the local password file as described above, but this did not work for me.

First worked on GlassFish Server Open Source Edition 3.1.2.2 (build 5). Change contents of this file:

 $GLASSFISH_HOME$\glassfish\domains\domain1\config\admin-keyfile 

from:

 admin;{SSHA}WQVj8i9CLECCiv+w6ZxGgMrcfPqHPoXZW+2Jdw==;asadmin 

I did not add a new line or carriage return at the end of the line.

This is my modification of the online solution .

0
source share

Copy the admin-key file from the initial zip installation (blank password).

0
source share

All Articles