Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So after spending the better part of my afternoon configuring a new dev environment for Java development on a Windows machine (with Eclipse and Ant and so forth), I was happy to see the developer before me had built the domain1 for the site I'm going to develop on. However, when I tried to log into the Control Panel on the Glassfish server, no joy. The developer had not picked an easy to guess admin password. I'd really, really like to avoid having to reinstall Glassfish and setting it all up again (PITA).

I know the password is stored in a one way hash. So I won't be able to retrieve it. Any bright ideas for resetting it or deleting it in Windows. I saw (via a Google search) some suggestions for doing it on Linux. But alas! I'm not on Linux. Help!


share|improve this question

migrated from Oct 4 '12 at 13:07

This question came from our site for professional and enthusiast programmers.

OK, I know this might be totally stupid. But since you can see (and hopefully edit) that hash of the password, there's a chance you also know the hash function that server used (MD5 or SHA1 would be my guess) to produce it. So basically what you need to do is generate a hash of your own password and replace the existent record with it. Voila! I'd start with MD5 (try this generator, it has worked for me in the past).

share|improve this answer
An interesting hack. Unfortunately, I've already reinstalled Glassfish, but this will be worth trying anyway...just out of shear curiosity. Thanks for the creative approach. – Lynn Jan 26 '11 at 22:13

One of my friends helped me to solve this problem 30 minutes ago. My answer comes certainly too late for Lynn but it might still be useful (I hope).

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.

share|improve this answer

If you can create a new domain or know the password to an existing domain then this might help you:

share|improve this answer

You must log in to answer this question.