Skip to content

Locked Out of Admin GUI

Symptom: can't log into the UnifiedBX web admin. Credentials rejected, account doesn't exist, or all admins were deleted.

Most Likely Causes

  1. Forgot password — straightforward.
  2. Deleted the only Full-access admin — locked yourself out structurally.
  3. GUI itself is broken — Apache down, PHP error, db connection lost.
  4. Fail2ban banned your IP after too many failed attempts.

Diagnose

# Are services up?
systemctl status httpd mariadb asterisk

# Try the login page:
curl -I https://<unifiedbx-fqdn>/admin/

# Are you banned?
fail2ban-client status freepbx-pbx
# Or check iptables:
iptables -L -n | grep <your-ip>

Fix

Forgot password (still have console / SSH access)

fwconsole userman setPassword <username> <new-password>

Deleted the only admin

fwconsole userman addUser admin newPass admin@example.com
fwconsole userman setPermissions admin all

Fail2ban ban

# Find your jail:
fail2ban-client status

# Unban:
fail2ban-client set <jail-name> unbanip <your-ip>

# Whitelist your IP permanently:
fail2ban-client set <jail-name> addignoreip <your-ip>

Or via UnifiedBX: System Admin → Sysadmin → Intrusion Detection → Whitelist.

Apache or DB down

systemctl restart httpd
systemctl restart mariadb

If they don't start, check their logs (/var/log/httpd/error_log, /var/log/mariadb/).

Total recovery (GUI broken AND CLI broken)

Boot in single-user mode, mount the disk, edit the admin user directly in the freepbxsettings MySQL DB. This is rare and painful — almost always one of the above gets you back in first.

When to Escalate

fwconsole userman returns errors about missing tables — the userman DB itself is corrupt. Restore from backup. See Restore a Backup.