Openfire admin password

Helo Everyone,

I just installed Openfire for the first time. We have a Red Hat server, so I went with the openfire-3.6.4-1.i386.rpm. It installed fine with no errors. It started fine. I went to the browser interface and configured it fine. I chose to use the embedded database and default group system. However, when I went to log in it told me that my username or password were incorrect. I have tried the solutions offered on this thread and none of them have worked.

Interestingly, when I tried to run the embedded viewer I got this error:

root@server sh embedded-db-viewer.sh
Starting embedded database viewer…
Exception in thread “main” java.lang.NoClassDefFoundError: org.hsqldb.util.DatabaseManagerSwing
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: org.hsqldb.util.DatabaseManagerSwing not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)

I made sure that I have gcc-java installed (4.1.2-48). Is there something else I need? Is my whole setup broken?

http://community.igniterealtime.org/message/205901 may help.

root@server sh embedded-db-viewer.sh
interesting, I would not start a java application as root

The error “Caused by: java.lang.ClassNotFoundException: org.hsqldb.util.DatabaseManagerSwing not found” indeicates that a “.class” or .“jar” file is missing to start the db viewer application, so it’s sad that you can’t start it but it does not hurt. Your database is so small right now, you can even view and edit it with “vi” (while Openfire is not running) if you want.

LG

where is the database file?

Openfire-Home/embedded-db/openfire.script (all changes/updates are in openfire.log if it does exists).

Not sure where the RPM file does install itself, /usr/local/jive/openfire may be possible.

LG

I openfire.xml appears in the administrator name … I add it?

That is what I get in my openfire.xml

<?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

–>

  • <!--
Disable either port by setting the value to -1

–>

9090

9091

es

  • <!--
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>

–>

org.jivesoftware.database.EmbeddedConnectionProvider

true

Strange… I could not log in to Admin Console even after your suggestions.

I’m using WAMP on localhost so I did this:

  1. Opened “openfire” database in PHPMyAdmin

  2. Opened “ofuser” table

  3. Found (at install time generated user) “admin”

  4. Edited cell in column (at install time created) “plainPassword

4a) New password was entered

  1. Login was successfull [username: admin / password: see 4a)]

Please do file a bug-report on this one.

N.B.

Since I’m running on localhost I do not have any certificates installed that should break the functionallity - or?

Hi Sasa,

did you test this with 3.7.0 beta?

LG

Hi!

Nopp - will firstly check out the non-beta sw.

/S

[Edit]

Yepp - now it works as it should.

But… (beta: ) Fastpath does not work correctly, it does not show up in main menu.

Reverting back to 3.6.4

That may be right or wrong - currently you need to compile the fastpath plugin to use it. The 3.6.4 plugins do likely not work as expected and the http://www.igniterealtime.org/projects/openfire/plugins-beta.jsp pages does not yet contain the plugins.

I found out that if you do not have openfire tied to AD, then the default login is “admin” and the password you entered during setup. By default is has nothing to do with the email address you entered at setup - like you’d think it would. This is still on Openfire 3.7

Is there somebody that can compile the Fastpath Service plugin for 3.7? In Subversion I see that it is in the 3.7 beta tag but not in trunk.

If you can access the database, please open the table named ofproperty, then find out the record

“admin.authorizedJIDs” and its propvalue is “admin@gauss-pc”.

That means only admin can login the admin panel.

So you can add another jid(make sure you know its password ) in it, For example “admin@gauss-pc,test1@gauss-pc”.

Restart openfire service,

Login in admin panel via the account which you just added.

**this method will work for External Database (i.e. Mysql). **

I was using openfire with external Mysql database and forgot the admin password

**then I followed these steps to successfully reset my passwrod: **

  1. used OpenFire Blowfish Class for password encryption (also attaching the code below)
  2. go to your openfire mysql database (in phpmyadmin)
  3. in Db go to “ofProperty” table and look for passwordKey->value (copy past this key for later use
  4. also updated “admin.authorizedJIDs” with **admin@vps.server.com (i.e: username@domain) inofProperty” **table
  5. **recover now with OpenFire Blowfish Class:

**
======================OpenFire Blowfish.php===========================

<?php

/**

* Emulate OpenFire Blowfish Class

*/

class OpenFireBlowfish

{

  • private $key;*

  • private $cipher;*

  • public $enckey = “acE1v7A2L0MdjuS”; //Hidden Encryption Key of Openfire BlowFish*

  • public $enciv = ‘’;*

  • function __construct($pass)*

  • {*

  •    $this->cipher = mcrypt_module_open('blowfish','','cbc','');*
    
  •    $ks = mcrypt_enc_get_key_size($this->cipher);*
    

_ $this->key = pack(‘H*’,sha1($pass));_

  • }*

  • function encryptString($plaintext, $iv = ‘’)*

  • {*

  •    if ($iv == '') {*
    
  •        $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($this->cipher));*
    
  •    }*
    
  •    else {*
    

_ $iv = pack(“H*”, $iv);_

  •    }*
    
  •    mcrypt_generic_init($this->cipher, $this->key, $iv);*
    
  •    $bs = mcrypt_enc_get_block_size($this->cipher); // get block size*
    
  •    $plaintext = mb_convert_encoding($plaintext,'UTF-16BE'); // set to 2 byte, network order*
    
  •    $pkcs = $bs - (strlen($plaintext) % $bs); // get pkcs5 pad length*
    
  •    $pkcs = str_repeat(chr($pkcs), $pkcs); // create padding string*
    
  •    $plaintext = $plaintext.$pkcs; // append pkcs5 padding to the data*
    
  •    $result = mcrypt_generic($this->cipher, $plaintext);*
    
  •    mcrypt_generic_deinit($this->cipher);*
    
  •    return $iv.$result;*
    
  • }*

  • function decryptString($ciphertext)*

  • {*

  •    $bs = mcrypt_enc_get_block_size($this->cipher); // get block size*
    
  •    $iv_size = mcrypt_enc_get_iv_size($this->cipher);*
    
  •    if ((strlen($ciphertext) % $bs) != 0) { // check string is proper size*
    
  •        exit(1);*
    
  •    }*
    
  •    $iv = substr($ciphertext, 0, $iv_size); // retrieve IV*
    
  •    $ciphertext = substr($ciphertext, $iv_size);*
    
  •    mcrypt_generic_init($this->cipher, $this->key, $iv);*
    
  •    $result = mdecrypt_generic($this->cipher, $ciphertext); // decrypt*
    

_ //echo var_dump(unpack(‘c*’,$iv))."\n";_

  •    $padding = ord(substr($result,-1)); // retrieve padding*
    

_ $result = substr($result,0,$padding * -1); // and remove it_

  •    mcrypt_generic_deinit($this->cipher);*
    
  •    return $result;*
    
  • }*

  • function __destruct()*

  • {*

  •    mcrypt_module_close($this->cipher);*
    
  • }*

}

// Test OpenFire Blowfish Class

$enckey = “paste your openfire passwordKey”; //paste your openfire Db passwordKey copied in poin# 3

*$enciv = ‘’; *

$a = new OpenFireBlowfish($enckey);

*$encstring = bin2hex($a->encryptString(‘password’,$enciv)); //enter your password string to encrypt it *

echo “Encrypted Password string:”.$encstring . “
”;

echo “Original Password string:”.$a->decryptString(pack(“H*”, $encstring)) . “
”;

?>

=========================================================

  1. now run this file on your local webserver and copy the encryptedPassword string

  2. now go to “ofUser” table in **openfire database **and replace the encryptedPassword string in your ofUser Table against your admin username.

Note:

  1. restart your server that can be done from WHM (forcerestart/graceful restart)

  2. after restarting server refresh your openfire page (http://xxx.xxx.xxx.xxx:9090/ or http://domain.com:9090 ) and login using username and password that you used for encryption

**this method will work for External Database Mysql.
**

Unfortunately this did not work for 3.10.3. Matter of fact of all the past admin console reported issues/fix none have worked. I have updated the PLAIN PASSWORD in the ofUser table in the database (MySQL - local) no dice. I have entered in the code that was presented by oxymoron.

***
jimuser


*** ***

I even left jimuser as the user - nada. So I am stuck. with 3.10.3 is there a method to reset the admin password so I can get in the console or am I just screwed blued and tattooed?

Cheers.

Tex

You can re-run the setup and when it asks for the current password you can actually put anything and it should work. Resetting admin passwords

Easy Solution! Senha do openfire com mysql e outros bancos

en este vídeo explico como ingresar a la consola de administracion de openfire si haz perdido tu contraseña de admin


in this video I explain how to access the Openfire administration console if you do your administrator password

1 Like

its not working why ?

This is not a problem at all, you do not need x on the server, only on the client, because you can always use ssh with X forwarding:

  • from Linux/GNU just: ssh -YC your_ip_address
  • from Windows you can use PuTTY+xming, or MobaXTerm
  • from OSX you can use XQuartz

after you ssh into your server with X forwarding, you can run GUI apps using the x server on your client side. The server side does not need x server at all. You can apt-get install any gui app on your x-disabled server, and run it remotely. Cheers.