When deploying Openfire on Ubuntu, many developers hit a frustrating roadblock: successfully completing the web installer but being locked out of the admin console with "wrong username/password" errors. The database shows your admin credentials exist, yet authentication fails. Let's break down why this happens and how to fix it.
Openfire uses a specific credential verification process:
// Simplified authentication sequence
1. Web installer creates admin user
2. Password gets encrypted via Blowfish
3. Credentials stored in ofUser table
4. Console compares input against stored hash
Database encoding mismatch: The most frequent issue occurs when the database character set doesn't match Openfire's expectations. Check your MySQL/MariaDB configuration:
SHOW VARIABLES LIKE 'character_set_database';
SHOW VARIABLES LIKE 'collation_database';
They should be utf8mb4 and utf8mb4_bin respectively for modern Openfire versions.
When standard recovery fails, manually resetting credentials often works:
-- First, stop Openfire service
sudo systemctl stop openfire
-- Connect to your database
mysql -u openfire_user -p openfire_db
-- Clear existing admin password
UPDATE ofUser SET plainPassword = NULL, encryptedPassword = NULL WHERE username = 'admin';
-- Set temporary plaintext password
UPDATE ofUser SET plainPassword = 'temp1234' WHERE username = 'admin';
-- Restart service
sudo systemctl start openfire
After this, you should be able to login with "temp1234" and immediately change it in the console.
Enable detailed logging by editing /opt/openfire/conf/log4j2.xml:
<Logger name="org.jivesoftware.openfire.auth" level="debug"/>
<Logger name="org.jivesoftware.openfire.admin" level="debug"/>
Tail the logs during login attempts:
tail -f /opt/openfire/logs/debug.log
If password issues persist, consider these approaches:
- Completely wipe and recreate the database schema using the original SQL files
- Verify the JDBC connector version matches your database
- Check for special characters in passwords that might not encode properly
Examine /opt/openfire/conf/openfire.xml for authentication settings:
<provider>
<auth>
<className>org.jivesoftware.openfire.auth.DefaultAuthProvider</className>
</auth>
<user>
<className>org.jivesoftware.openfire.user.DefaultUserProvider</className>
</user>
</provider>
Incorrect provider configurations can prevent successful logins.
When setting up Openfire on Ubuntu, many administrators encounter authentication failures when trying to access the admin console after completing the web-based setup. The system reports incorrect credentials despite:
- Successful database configuration
- Proper user creation in MySQL
- Apparent password encryption in the database
First, verify the admin user exists in your database:
SELECT * FROM ofUser WHERE username = 'admin';
Check the password field. Openfire typically stores passwords hashed with Blowfish. If you see plain text or incorrect hashing, that's your issue.
If the password appears corrupted, reset it directly in MySQL:
UPDATE ofUser SET encryptedPassword = MD5('your_new_password') WHERE username = 'admin';
FLUSH PRIVILEGES;
Alternatively, use Openfire's proper Blowfish hash:
UPDATE ofUser SET encryptedPassword = '2a$10$N9qo8uLOickgx2ZMRZoMy...' WHERE username = 'admin';
Examine /usr/share/openfire/conf/openfire.xml for database connection issues:
<connectionProvider>
<className>org.jivesoftware.database.DefaultConnectionProvider</className>
<driver>com.mysql.jdbc.Driver</driver>
<serverURL>jdbc:mysql://localhost:3306/openfire?useSSL=false</serverURL>
<username>openfire_user</username>
<password>your_password</password>
</connectionProvider>
If standard authentication fails, try these approaches:
- Restart Openfire service:
sudo systemctl restart openfire - Clear browser cache or try incognito mode
- Verify server time synchronization (NTP issues can cause auth failures)
Check Openfire logs for authentication attempts:
tail -f /var/log/openfire/error.log
Look for messages like:
ERROR [org.jivesoftware.openfire.auth.DefaultAuthProvider] -
Unable to authorize user admin with the given password
As last resort, perform a clean reinstall:
sudo apt purge openfire
sudo rm -rf /etc/openfire /usr/share/openfire /var/lib/openfire
sudo apt install openfire
Remember to backup your database first if you have existing data.