Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i reset the forgotten password of glassfish server 4

Recently, i change the password for admin, and unfortunately i don't remember the password of my glassfish server 4. How, can i reset the password.

I've followed the instruction provided in the following link "https://superuser.com/questions/7654/how-to-reset-delete-my-glassfish-password", but it didn't help me.

i went to this path "../glassfish4/glassfish/domains/MyDomain/config/" and change the "admin-keyfile" file, but still it didn't help me.

like image 785
Jagesh Maharjan Avatar asked Dec 10 '16 18:12

Jagesh Maharjan


People also ask

How do I find my GlassFish username and password?

The GlassFish Server port number: The default is 8080. The administration server's port number: The default is 4848. An administration user name and password: The default user name is admin , and by default no password is required.

Where is GlassFish admin 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 . GlassFish Server stores user credentials in a certificate database.

How do I change my admin password in payara?

The default Payara Server Docker image already contains asadmin commands which change the admin password. You can copy the lines that create /opt/tmpfile and use it with the change-admin-password command to change the admin password. docker build -t my-payara/server-full .


1 Answers

Finally, after few hours of posting the question, i found a solution. On my glassfish installed directory, this in my case /glassfish4/glassfish/domains/mydomain/config. I edit the file named with file name admin-keyfile. i added this line next to the existing line( but i commented the existing line).

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

Then i restart the glassfish server.

Since, i m loading the glassfish server in different machine[Not required if running locally], i additionally need to run this command asadmin enable-secure-admin to make secure enable and asadmin change-admin-password. To set new password. Then i restarted the server again.
Finally it worked.

like image 51
Jagesh Maharjan Avatar answered Sep 20 '22 20:09

Jagesh Maharjan