Unable to login to WebGUI Admin Module: My password is no longer working

I have having issues with inbound trunks getting a CHAN Unavailable so I went to log into my admin account. Was using the default admin password and it is no longer letting me log in. I can log into my RasPBX via SSH and still have root access. However whenever I try to unlock a session or change a password via MySQL I run into errors.

Unlocking a session gets this error:

Session Should be unlocked now
Whoops\Exception\ErrorException: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5/sessions) in file Unknown on line 0
Stack trace:

  1. () Unknown:0

Trying to log in to MySQL with the default blank password yields the following error

[email protected]:~# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)

Any help would be welcome thanks.

I saw something like this a couple weeks ago. Log into the console as ‘root’ and connect to MySQL using just “mysql” - no options.

If that doesn’t work, try logging in as ‘mysql -u root -p -h’.

If you get in the second way, you’re seeing the same MySQL hack I saw a couple weeks ago.

Both of those options give me a access denied. Trying both blank and ssh password.

Not sure how they could hack in. It sits behind a NAT’d firewall with no ports forwarded to it.

Look in /etc/freepbx.conf for your freepbxuser username and password for mysql.

This is why random online install scripts for FreePBX are unreliable. You never know what they are going to do.

Also, if your MySQL ‘root’ user is actually not using a password, don’t use the “-p” option.

Is there another way to add a admin user to get into the online portal/ reset the existing password without having to mess around with MySQL?

In your case no. You are using an unsupported platform so it appears that fwconsole unlock is completely broken for you. The only way to do this is use MySQL directly. Unless you do what the original error says which is fix your session paths.