powered by Jive Software

Deleted admin user on openfire 3.9.3

So the admin user mistakenly got deleted from the system. I am running openfire 3.9.3 with an external mysql database on Debian6. I found a lot of posts on this but they were all outdated. They all said to do:

INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)

VALUES (’‘admin’’, ‘‘admin’’, ‘‘Administrator’’, ‘‘admin@example.com’’, ‘‘0’’, ‘‘0’’);

I not not sure if this because i am on a new version or if it’s because I"m on the external database but I do not see a jiveUser table. There is an ofUsers. I tried inserting both:

INSERT INTO ofUser (username, plainPassword, name, email, creationDate, modificationDate)

VALUES (’‘admin’’, ‘‘admin’’, ‘‘Administrator’’, ‘‘admin@example.com’’, ‘‘0’’, ‘‘0’’);

INSERT INTO ofUser (username, encryptedPassword, name, email, creationDate, modificationDate)

VALUES (’‘admin’’, ‘md5(‘admin’’), ‘‘Administrator’’, ‘‘admin@example.com’’, ‘‘0’’, ‘‘0’’);

From all apearences it looks correct when doing select * from ufUser \G but I am unable to login. I tried flushing tables and privildges and restarting openfire.

Can someone help me out.

Do you have one user which can login via xmpp?

I think its ofproperties which contains the key authorizedJids. Replace the existing value ‘admin@…’ with your Jid ‘username@…’.

No users can login. It was currently set to 1@servername. I changed it to admin@servername then flushed tables and privliges and I still can’t login to the admin console.

I would stop Openfire, edit /openfire/conf/openfire.xml, uncomment

and add my user to it like


if there is no such tag, then one can add this below :


Then would start Openfire and login with user wroot to Admin Console and then maybe would try adding admin user back (never tried, not sure if one ca add it this way). Then would remove admin privileges from user wroot.

Another option would be to rerun a setup, maybe it will add admin acc back when specifying admin password.