Windows – Lost admin password for Glassfish Server on Windows 7

glassfishwindows 7

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!

Thanks!

Best Answer

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

Related Question