I’ve discovered a bug which causes you to lose the ability to login as the admin user. I discovered it in the Windows version. Here’s how to duplicate (and fix) the bug.
Set-up Openfire using the Embedded Database.
Create a second user and grant that user admin privileges.
Change the Server Name.
Restart the Server.
You will no longer be able to login to your server using any login.
You have two options to fix the bug.
First, STOP the server.
Second, edit this file:
/openfire/embedded-db/openfire.script
Third, do either of the following:
Remove the lines that read:
INSERT INTO OFPROPERTY VALUES(‘admin.authorizedJIDs’,‘admin@SERVERNAME,seconduser@SERVERNAME’)
Alternatively,you’ll notice on the line above that SERVERNAME is your OLD Serve Name. Change what appears in SERVERNAME from the older Sever Name to the NEW Server Name. Save.
Fourth, Restart the server.
If you do #1, all users who were designataed as administrators will lose their admin status. You will be able to login only using the “admin” user.
If you do #2, all users will retain admin status and be able to login again.
Note: They key to the bug is that when you create a SECOND admin user, Openfire adds a field that lists the authorized admins into the database including their JID (USERNAME@SERVERNAME).
When the Server Name is changed, however, Openfire doesn’t update that field to the NEW Server Name, and so nobody can login.
If you never create a second admin user, Open Fire never adds that line to the database, and you’ll never experience the issue even if you change the Server Name.
If you create a second admin user, but you never change the Server Name, you’ll also never experience the issue.
It looks like the people who posted those comments don’t know what they are talking about.
Re-running set-up does NOT fix the behavior.
People sometimes do change the Server Name for legitimate reasons.
For example, I initially deployed the server internally using an internal IP address as the Server Name, and then, when I was ready to move it publicly, changed the server name.