Source: FreePBX Wiki
In the event that you are unable to access the GUI using the admin login and password, you can use the following steps from an SSH connection to your instance to unlock the GUI.
fwconsole unlock xxxxxxxxxxxxxxxx- The fwconsole unlock command will unlock the GUI login of FreePBX to let you into the FreePBX GUI without the username and password. This is handy if you lost or misplaced your FreePBX GUI username or password and need to get into the GUI to change or setup a new user. You need to replace the xxxxxxx with your PHP session ID. Follow the steps below.
- Bring up the main login page to FreePBX in your browser. Such as http://YOUR-PUBLIC-IP/admin
- Do a "Ctrl-a" or "Cmd-a" to highlight the whole page and look to the left center of the screen for some text. This is your unique php session ID. Copy this into your clipboard.
Go into the linux CLI and type the following command replacing the session ID below with your own.
- Go refresh your browser page and it will log you in this one time automatically for you based on that php session ID. Now you can go add or change the FreePBX admin users.
Set New Password
Go to Admin --> Administrators:
Open the fly-out menu on the right and choose the admin user:
Set a password here and click Submit: