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

<authorizedUsernames></authorizedUsernames>
and add my user to it like

<authorizedUsernames>wroot</authorizedUsernames>

if there is no such tag, then one can add this below </adminConsole> :

<admin>

<authorizedUsernames>wroot</authorizedUsernames>

</admin>

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.

Hi All,
While deleting inactive users i mistakenly deleted the “admin” user from admin console and now my admin consol is opening fine but as admin deleted i can’t login to admin consol., openfire server installed on windows 10. I am using openfire inbuilt database ( embedded database )
I need to gain access to do my daily administration tasks to create new users and get reports etc …
Can you suggest me how to fix it ?
Exp : can i recreate admin users through any back end config file ?
or
can i give admin/administrator rights to aready existed normal user in openfire ?
any possible way kindly share …
waiting for replies…

I have edited my above post so html tags are visible again. So stop Openfirw, edit openfire.xml and add your own user as admin

Hi,

I tried same but no luck its still not allowing to my user which is able to login on spark but not as admin after update following:

talwinder