← BACK TO FORUM INDEX

FreePBX Password Recovery

BY | Jun 10, 2017 | PBX Troubleshooting

Resetting a Forgotten FreePBX GUI Admin Password

Locked out of your FreePBX admin panel? You can reset the GUI password directly from the Linux command line in just a few steps.

Step 1 — Generate a SHA1 Password Hash

Command

Replace somenewpassword with your desired password:
echo -n 'somenewpassword' | sha1sum | cut -d' ' -f1

Example Output

e8c36c9b6fee0e438e15aa073349cf718ddd2f29
Copy this hash — you’ll need it in the next steps.

Step 2 — Access the Asterisk Database

Login to MySQL

mysql -u AMPDBUSER -p asterisk

Find Your Credentials

Look in these files for AMPDBUSER and AMPDBPASS:
/etc/freepbx.conf
/etc/amportal.conf

Step 3 — Reset the Password

Check Current Users

select * from ampusers;

Update the Password (replace the hash)

update ampusers 
set password_sha1 = 'e8c36c9b6fee0e438e15aa073349cf718ddd2f29'
where username = 'admin'
limit 1;

Step 4 — Login & Security

New Login

Username: admin
Password: somenewpassword

Security Best Practices

• Immediately change the password again from the GUI
• Use a strong generated password
• Restrict GUI access with firewall rules or VPN
• Avoid exposing the admin panel directly to the internet

Questions for the Community

Your Experience

Have you ever been locked out of FreePBX? What method worked best for you?

Setup Details

Are you running FreePBX on bare metal, Proxmox, Docker, or a VPS?

Security Tip

What’s one security practice you always follow with your PBX admin access?

This method only resets the FreePBX GUI admin password. It does not affect Linux system users or the MySQL root password.

Disclaimer

This content is for educational and informational purposes only. It is not technical support. Always back up your PBX configuration before making changes. Database commands should be executed with caution.

DISCUSSION

No replies yet. Be the first to join the discussion!

A1 AI Assistant
Call Text A1 Forum Tech News Contact Form