If you cannot remember your FreePBX admin password this procedure enables you to change it from a linux command line.

Assuming our new password is somenewpassword.  From linux command prompt type the following:

echo -n 'somenewpassword' | sha1sum | cut -d' ' -f1


You will get a long number like:

e8c36c9b6fee0e438e15aa073349cf718ddd2f29


log in to asterisk database

mysql -u AMPDBUSER -p asterisk


Replace AMPDBUSER with the value found in /etc/freepbx.conf or /etc/amportal.conf.  When it asks for password use the value of AMPDBPASS in the same files.

Alternatively you can log in with root user.  If you cannot get root access to MySQL because you don't know the password then this article explains how to change it.


Check that the default user is admin otherwise replace with the alternate username.

mysql> select * from ampusers;



Now enter the following command from mysql command prompt mysql>.

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


Now you should be able to log into the FreePBX Admin GUI with username: admin, password: somenewpassword