Resetting admin passwords

We used to have about 2-3 admin users for Spark, but the original tech people who set it up no longer work in our organization and the usernames and passwords were never recorded. How can I go about resetting or figuring out the password, without reinstalling the whole software again?

Any help is greatly appreciated.

Thanks

Ahmed

You can add another user as admin, login with him and then reset passwords of other admins. Stop the Openfire, edit /openfire/conf/openfire.xml

Uncomment the or tag and add JIDS (user@servername) or users in there. Save it. Start Openfire and then try to login with added user.

I tried to add another user but thier is no " or " in that file so please your support.

Which version of Openfire are you using? In the current 3.10.0 builds this part is missing, but 3.9.3 should still have it. Anyway, you can try adding this between tags, so it should look like that:

< /adminConsole>

< admin>

< !-- < authorizedUsernames>< /authorizedUsernames> -->

< !-- < authorizedJIDs>< /authorizedJIDs> -->

< /admin>

< locale>en< /locale>

< !-- Network settings. By default, Openfire will bind to all network interfaces.

Alternatively, you can specify a specific network interfaces that the server

will listen on. For example, 127.0.0.1. This setting is generally only useful

on multi-homed servers. -->

< /admin>

or

< admin>

< !-- < authorizedUsernames>< /authorizedUsernames> -->

< authorizedJIDs>user1@servername< /authorizedJIDs>

< /admin>

Note, that you have to uncomment selected tag by removing < !-- and -->. Your servername is in System Properties “xmpp.domain” field.

Then you should save this file and start Openfire. Then it should allow this user to login to Admin Console as admin. Note, that this part will disappear from the openfire.xml part after Openfire starts and imports this information into database.

ADDED SPACES IN EVERY TAG (AFTER < SYMBOL) AS FORUMS WON"T SHOW THEM OVERWISE, THE SPACES SHOULD BE REMOVED

Thanks for support, I am using version 3.8.2 and I tried to pase the sicrip above but there is no tags inside openfire.xml

If there is no tag, then paste it after the tag. Paste it with the and parts.

there is no inside openfire.xml file either

Lets turn this around: what is in that file?

Wroot said I have to edit that file and type that script inside it so I will able to open the open file admin console, but I can`t find any tags like he said inside that file so please I forgot my user name and password for open file admin console is there any way to get them without reinstall it

I knkw that you don’t have admin tag, just find the /adminConsole tag and paste it under.

Or as Guus suggests copy and paste the ontent of your openfire.xml here. Just check it first and remove any sensitive information like passwords or ip addresses.

Or wait and i will paste an example later.

thank you for help but I can`t find any of these tags inside the file

please find the file content below

<?xml version="1.0" encoding="UTF-8"?> <!--
    This file stores bootstrap properties needed by Openfire.
    Property names must be in the format: "prop.name.is.blah=value"
    That will be stored as:
        <prop>
            <name>
                <is>
                    <blah>value</blah>
                </is>
            </name>
        </prop>     Most properties are stored in the Openfire database. A
    property viewer and editor is included in the admin console.
-->
<!-- root element, all properties must be under this element -->
<jive>
  <adminConsole>
    <!-- Disable either port by setting the value to -1 -->     <port>9090</port>     <securePort>9091</securePort>
  </adminConsole>   <locale>en</locale>   <!-- Network settings. By default, Openfire will bind to all network interfaces.
      Alternatively, you can specify a specific network interfaces that the server
      will listen on. For example, 127.0.0.1. This setting is generally only useful
       on multi-homed servers. -->   <!--
    <network>
        <interface></interface>
    </network>
    -->   <connectionProvider>
    <className>org.jivesoftware.database.EmbeddedConnectionProvider</className>
  </connectionProvider>   <setup>true</setup>
</jive>

can you help me with that and as I said I need the username and pass to log in to my openfire admin console

Thank you

The adminConsole tag that Wroot was referring to can be found in line 21 through 25 of your file. I have modified the file. Copy and paste this, and place it in openfire.xml (overwrite all old content). Next, replace the text INSERT-USERNAME-HERE (line 27) with the a username for which you still remember the password. After you save that file and restart Openfire, you should be able to log into the admin console with that username and its password.

<?xml version="1.0" encoding="UTF-8"?> <!--
    This file stores bootstrap properties needed by Openfire.
    Property names must be in the format: "prop.name.is.blah=value"
    That will be stored as:
        <prop>
            <name>
                <is>
                    <blah>value</blah>
                </is>
            </name>
        </prop>     Most properties are stored in the Openfire database. A
    property viewer and editor is included in the admin console.
-->
<!-- root element, all properties must be under this element -->
<jive>
  <adminConsole>
    <!-- Disable either port by setting the value to -1 -->
    <port>9090</port>
    <securePort>9091</securePort>
  </adminConsole>
  <admin>
    <authorizedUsernames>INSERT-USERNAME-HERE</authorizedUsernames>
    <!-- <authorizedJIDs></authorizedJIDs> -->
  </admin>
  <locale>en</locale>
  <!-- Network settings. By default, Openfire will bind to all network interfaces.
      Alternatively, you can specify a specific network interfaces that the server
      will listen on. For example, 127.0.0.1. This setting is generally only useful
      on multi-homed servers. -->
  <!--
    <network>
        <interface></interface>
    </network>
    -->
  <connectionProvider>
    <className>org.jivesoftware.database.EmbeddedConnectionProvider</className>
  </connectionProvider>
  <setup>true</setup>
</jive>
2 Likes

Guus, Thank you very much for your briefly explain but unfortunately I don`t remember my user name either so can put any user name AND IF i DID HOW ABOUT THE PASSWORD?

We are not suggesting putting usernames of the old admins there. You don’t remember their passwords anyway. What the suggest is to put a username of ANY simple user here, so this user will become an admin and will be able to login to Admin Console. Or you don’t know any password of any of the users on your server? In that case this is a dead end. Well, it may be possible to edit the database and change it there if the password is not encrypted. But that’s dark waters for me.

You only have to put a username there. And then after starting Openfire, go to Admin Console and put same username into Login field and then put a password into Password field.

this is the problem, we don`t know the passwords of all theses users what I have to do?

If inband registration is enabled (in older versions of Openfire, it is by default), you can use a client to create a new user. Then you have a user that you can make admin of Openfire.

so you mean I can create new username on spark program and take this username and past it on this sicript so it will be as and admin and I can use on openfire admin consol??

Clever, Guus

Let’s hope previous admins hhaven’t disabled registration and i think it is enabled by default.

Yes, you should log out in Spark, go to Account menu, create a new account on the server and then try adding this account to openfire.xml

On a side note, maybe it is reasonable to have to have some kind of resetadmin tag in future Openfire versions to fix such issues.

thank you all

I did create new user and stop the open fire then I did copy the script Guus gave to me and past it after modifying the username but when I started the open fire again and try to lunch admin to access to admin console page it gives me this error message

C:\programfiles\openfire\conf\openfire.xml the processing instruction target matching “[xX][mM][lL]” in not allowed

what is the wrong??

guys after I try to create new username at first it said this username exist so I open the server and tried this username with multiple passwords and finally it did work thank you so much guys for your time and appreciated.