unfortunately you have to type correct old password, which I did not remember. The way I went aroud it was:
- edit /usr/share/openfire/conf/openfire.xml and after setting setup tag to false: false
- enter the web console, the setup restarts, most settings are remembered, I click on “Next” until the page where you setup admin password
- In the edit box asking for the current password, I type “admin”, which is not the current password (I can’t remember the actual one), and I set the new password as I see fit BUT I do not click “Next” just yet…
- I login to the server where I have MySQL database that my openfire is configured to use, and in the database I manually update the admin user password to “admin”. The users are in the table ofUser, and they are encrypted, and even salted, BUT each row also has a column called “plainPassword” which (by default) is set to NULL, so I simply run: update ofUser set plainPassword=‘admin’ where username=‘admin’; and return to the web interface, hit “Next” and get accepted.
- After that, I return to my mysql db and just double check: select * from ofUser; and I see that password hash is updated, and the “plainPassword” field is again NULL, so all good
- I go to the main login page of the admin console, and all works like a charm. Cheers!
I hope this helps somebody. I couldn’t really follow none of the advices here, because some parts of my case were different. I didn’t have ANY user but the admin user, and I didn’t remember its password. I just figured that it all must be stored in the db and I just peeked at it, and seeing column called “plainPassword” that was NULL I just made a guess, which saved my day. In the end I think this routine is even less hustle than temporarily allowing another user as admin (requires less edit in the openfire.xml file), and certainly less hustle than creating a new user with Spark just for the sake to temporarily granting it admin access. The only requirement is that you must remember your mysql (or other db you are using) server root password. If you don’t even remember that, then it is not great, but at least in the case of MySQL recovering that one is not that hard either. Cheers!