Have you just upgraded your Freepbx system and now see this error when trying to log in the web administration.

FATAL ERROR

SELECT username, password_sha1, extension_low, extension_high, deptname, sections FROM ampusers WHERE username = ‘asteriskuser’
DB Error: no such field

this is a simple thing to fix.

The problem is that the upgrade should have changed a column name in your my mysql database. ( but it didn’t for some reason )

How to Fix :

You need to log in to your mysql database ( either through phpmyadmin, webmin, ssh or on the console )

if you are using ssh or console you will first need to find your mysql password.

nano /etc/amportal.conf

you will see a line with “AMPDBPASS=xxxxxxx” this is your password

mysql -u asteriskuser -p

it will then ask for your password, key in your password and press enter

now you should have a mysql prompt which will look like this ” mysql-> ”

now you need to select the correct database

use asterisk

and check the current configuration of the table

select * from ampusers;

you should see something like this

+---------------+--------------------+
|  username     |   password         |          and so on
+---------------+--------------------+

we need to change the password column to password_sha1

alter table ampusers change password password_sha1 varchar(20);

now exit mysql

exit

That is all you need to do. Now you should be able to log in to Freepbx web console.

If you enjoyed this post, make sure you subscribe to my RSS feed!