AUTHTYPE=database locks out from FreePBX

I have a Trixbox (installed from ISO) with latest updates. I thinks FreePBX version was 2.3.x.x on CentOS. The maint screen shows v2.2.3 ©2007 Fonality. Asterisk version is 1.2.22. I have 2 zap, 2 voip trunks and 10-15 exts.

I tried changing the AUTHTYPE=database a few times in past couple of months. It always locked me out because I first created admin users and then changed authtype. My mistake. Later after reading couple of articles on this, I deleted the users and then changed authtype=database. However, FreePBX locked me out. Tried combinations of admin/admin, admin/amp109, admin/amp111, maint/password (that was working on trixbox main screen) and several others that I could think of. No use at all.

Thought of another alternative. I edited the table of ampusers in asterisk db and added user admin and password admin. Did not work. Today I removed the password for user admin in ‘ampusers’ table. Now, when I go to the http://ipaddress/maint/ it lets me login with the original password that is the one I was using before authtype=database. On this main screen I have the following notices, which were not there before.

Notice: Undefined offset: 1 in /var/www/html/maint/modules/01_Home/includes/asteriskInfo_functions.php on line 115
Notice: Undefined offset: 2 in /var/www/html/maint/modules/01_Home/includes/asteriskInfo_functions.php on line 118
Notice: Undefined offset: 4 in /var/www/html/maint/modules/01_Home/includes/asteriskInfo_functions.php on line 119

Other than that I can go to phpmyadmin interface. But when I select “FreePBX” now, it just hangs up and does nothing. On the CLI I have the following scrolling and scrolling …

Connected to Asterisk 1.2.22 currently running on convermation (pid = 7252)
Verbosity is at least 3
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1

It just does not stop. The exchange is still working fine, so I am still on the same stage. All I want is multiple admin users.

Any help/guideline would be highly appreciated.