Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I forgot the master-password of my Glassfish 3.1.2.2. Is there a way to reset it? I spent a lot of time "googling around" but i didn't find a suitable answer.

like image 652
kKdH Avatar asked Jun 07 '13 13:06

kKdH


People also ask

How can I recover my GlassFish admin-password?

In the domain1/config folder of GlassFish there's a file "admin-keyfile", make a backup copy of it. Change the admin line to read "admin; ;asadmin". Restart the server and you should be able to log in with just the user account "admin" and no password. Save this answer.

What is the GlassFish master password?

The default master password is changeit . Use the change-master-password subcommand in local mode to modify the master password. When the master password is changed, it is re-saved in the master-password keystore, which is a Java JCEKS type keystore.

Where is GlassFish password stored?

GlassFish Server stores user credentials locally in a file named keyfile . The file realm is the initial default realm. The administration realm is also a file realm and stores administrator user credentials locally in a file named admin-keyfile .


2 Answers

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.

like image 64
Tim B Avatar answered Oct 02 '22 19:10

Tim B


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 :-)

like image 33
John Clingan Avatar answered Oct 02 '22 19:10

John Clingan