I'm trying to install GlassFish v2 on my Macintosh. The installation instructions say that it should prompt for an admin password, but it doesn't, and now I can't log into the admin console on localhost:4848. And I can't change it with asadmin change-admin-password because it needs the old one. I think I installed GlassFish with NetBeans a few months ago and might have started it up once or twice, but I don't remember what password I used back then. Is there a command I can give or a file I can delete to make it forget that old password and prompt me for a new one?
7 Answers
The default password is built into the app, and at the risk of making unsecure apps even more unsecure. Default password is "adminadmin".
-
2Ok, that gave me the clue. Evidently the default password is built into the app, and at the risk of making unsecure apps even more unsecure, it's "adminadmin". Jul 18, 2009 at 1:07
-
glassfish default master password is "changeit" I think, FWIW (distinct from admin password).– ThufirMar 12, 2015 at 9:49
The content of glassfish3\glassfish\domains\domain1\config\local_password
file is a backup password to log in as admin
.
(let's pack some rep after the years)
You can also create a new domain, set the admin password there to whatever you like and move the password files over to your original domain. Here's a blog post explaining the process:
http://techteam.wordpress.com/2009/06/25/reset-glassfish-password/
-
16There's even better answer in that post now. Go to
glassfish3\glassfish\domains\domain1\config\local_password
file - its contents are a backup password to log in asadmin
. May 7, 2012 at 10:35 -
With Glassfish 3.1.2.2, at least, you can replace the domain\config\admin-keyfile contents with the following:
admin;{SSHA256}UV9EsTaoxzAdtxiNMKTkb3g0WjnoUBEBgpDQIGSdOu8QhprFoWiSCw==;asadmin
This will give you a username of 'admin' and password 'changeit'.
-
1
Login to asadmin and start Glassfish from the command line:
/usr/local/glassfish-4.1/bin/asadmin asadmin> start-domain
The admin port should be 4848, other port causes fail in attempt to change the password. Reset password as an empty string:
asadmin> set --user admin server.jms-service.jms-host.default_JMS_host.admin-password=
asadmin> exit
It is useful for testing and development. NetBeans doesn't allow integrating Glassfish with password, password is always not accepted. To remove password is workaround.
Under glassfish 4 you have a shiny new option as shown in the example below (and I'm giving my admin password for free for real ;))
-
that does not change or reset the glassfish password, it just set the password that will be used by netbeans to start glassfish server– yeradisNov 18, 2013 at 11:10
-
He said he installed GlassFish with NetBeans therefore Glassfish is automatically set up by NetBeans installer, as of Netbeans 7.X this password is set randomly by NetBeans and can only be seen by looking inside the Servers option. No need to reset it if you can read it!– dendiniNov 25, 2013 at 9:37
Use this solution:
Edit file: glassfish3/glassfish/domains/domain1/config/admin-keyfile
Change for this:
admin;{SSHA256}XgG1PxXKYtXG6oFgebY9QNaQ9UQrNf9xuM5byBvKw+1WRfSIRXQUMg==;asadmin
You need to run this command asadmin enable-secure-admin
to make secure enable and asadmin change-admin-password
Enter admin user name [default: admin]> admin
Enter admin password> 123456
Enter new admin password> newpass
Enter new admin password again> newpass
Command change-admin-password executed successfully.