Linux – Openfire admin password reset

javalinuxopenfirerpm

I have a openfire server that was installed through RPM on one of my Linux server. Server is very old and going away soon, so I'm moving openfire to a new server. I installed same version of openfire on a newserver, now when I'm trying to access Administrative Console it wont let me log in 🙁 Password is OK since I'm taking same password that was used before.


SELECT ofUser WHERE username='admin';

shows me my user admin w/ encrypted password, I even tried changing it to a plain password and tried login again it didn't help 🙁 so I revert my changes, any other ideas?

Best Answer

On your new OpenFire server where you know the admin password, use MySQL to do your SELECT query and see its hashed password (I believe its the encryptedPassword column, been awhile since I had OpenFire set up). Copy that entire hashed password to your clipboard, then flip over to the old OpenFire server's MySQL DB and do an:

UPDATE ofUser SET encryptedPassword='<paste in password hash here>' WHERE username='admin';

This should then allow you to access the old OpenFire server using the password you use on the new OpenFire server. It will only work if the OpenFire server isn't salting hashes using some specific string on a per installation basis.

Alternatively, I found this: http://www.bowu.org/open-source/how-to-recover-openfire-admin-password.html

Or, I also found this on the Ignite forums: http://community.igniterealtime.org/thread/46458

Both basically just suggest you tell OpenFire it is an initial installation again, and it'll let you set the admin password (and as long as you pick all the other settings the same it should be fine). I'd definitely take that second person's advice and back up the database first, in case the setup wizard goes and wipes out your database or something.