Openfire 4.3.2 fresh install ask for current admin password

Hi,

Today I’ve installed fresh install on Ubuntu 18.04 and in the setup process ask for current admin password which is wrong (since is a new install).
Removed, purged, dropped DB and installed all again and still the same problem persist.

Any ideas?

Thanks.

This looks like permissions issue which also happens on Windows when Openfire process is running with insufficient permissions. Then Openfire can’t write changes to config file and this issue appears. Make sure the user running Openfire process/service is able to write into /openfire folder (recursively) and that it has correct access to DB. https://issues.igniterealtime.org/browse/OF-1298

Hi wroot,

I think is not the case, because if I omit that step, the configuration of the database is being saved in the file (as another options as well).

Well, i can only test in my Ubuntu 18.10 VM. After i install Openfire via dpkg -i x.deb and adjust JAVA_HOME in /etc/default/openfire to point to /usr/lib/jvm/java-8-openjdk-amd64/jre
i then run it via sudo /etc/init.d/openfire start
then go to http://localhost:9090 and go through a setup selecting embedded database option (don’t have SQL running), it goes ok and no current password is required.

If i try to run it with my current user, i first change ownership:
sudo chown -R test:users /usr/share/openfire
sudo chown -R test:users /etc/openfire (conf)
sudo chown -R test:users /var/log/openfire (logs)
sudo chown test:users /var/run/openfire.pid (pid)

then i am able to start Openfire with test user, although it complains about not being able to set gid, but it starts and i can go through a setup, but then i see your issue with Current password. I think i still have to set permissions somewhere, but i don’t know where exactly. I’m a Windows guy :slight_smile: Not so familiar with Linux/Debian/Ubuntu. This still looks like the same permissions issue to me.

I think all have a valid permission:

ls -l /usr/share/openfire /etc/openfire /var/log/openfire /var/run/openfire.pid
-rw-r–r-- 1 root root 5 feb 14 10:40 /var/run/openfire.pid

/etc/openfire:
total 16
-rw-r----- 1 openfire openfire 3740 ene 31 14:29 log4j2.xml
-rw-r–r-- 1 openfire openfire 2377 feb 14 10:40 openfire.xml
drwxr-x— 3 openfire openfire 4096 feb 13 18:01 security
-rw-r–r-- 1 openfire openfire 2947 feb 14 10:40 security.xml

/usr/share/openfire:
total 8
lrwxrwxrwx 1 openfire openfire 13 ene 31 14:29 conf → /etc/openfire
lrwxrwxrwx 1 openfire openfire 29 ene 31 14:29 embedded-db → /var/lib/openfire/embedded-db
drwxr-x— 2 openfire openfire 4096 feb 13 18:01 lib
lrwxrwxrwx 1 openfire openfire 17 ene 31 14:29 logs → /var/log/openfire
lrwxrwxrwx 1 openfire openfire 25 ene 31 14:29 plugins → /var/lib/openfire/plugins
drwxr-x— 3 openfire openfire 4096 feb 13 18:01 resources

/var/log/openfire:
total 96
-rw-r–r-- 1 openfire openfire 42197 feb 14 10:40 all.log
-rw-r–r-- 1 openfire openfire 0 feb 13 18:01 debug.log
-rw-r–r-- 1 openfire openfire 17449 feb 14 10:40 error.log
-rw-r–r-- 1 openfire openfire 6926 feb 14 10:40 info.log
-rw-r–r-- 1 openfire openfire 16570 feb 13 18:09 warn.log

EDIT: also to mention, is not the first time I install OpenFire. I’ve being installing OpenFire since version 3.x, but this is the first time on fresh install with 4.x. With 3.x never had this problem.

Yes, i have seen many reports with problems on Debian with 4.3 release, but nobody from the devs have looked into it or have a clue. I have filed this a while ago https://issues.igniterealtime.org/browse/OF-1684

Is there a way to create correctly the admin user directly in the DB to bypass this problem? Maybe if I insert it into the db…

Probably, but i don’t know where exactly. @speedy i think you used to do this?

The admin user is saved ofUser table, but need to generate some keys in storedKey, serverKey, salt and encryptedPassword.

Hi Guys,

Any ideas how to solve this? :frowning:

Thanks.

I’ve found the problem. It was the db character set, which MariaDB creates as default with utf8mb4_general_ci. Changed to utf8_general_ci, restarted installation and now works.

1 Like

Thanks for coming back with that info. I have found error in my testing also and it works for me now. But i was using embedded database. Your issue might be because of our updates SQL connector, which maybe is more adjusted to work with Oracle MySQL. I think this is worth filing https://issues.igniterealtime.org/browse/OF-1694