Spent a good few hours with no luck, finally came across this link:
http://wiki.opencsta.org/index.php/..._in_database_for_admin_to_reset_lost_password
however, found I was getting an
"Access denied for user 'root'@'localhost' errot, so merged intructions from the first linlk with this link:
http://www.linuxquestions.org/questions/linux-software-2/error-1045-28000-access-denied-for-user-root@localhost-using-password-no-459578/
Create a php file:
[root@localhost ~]# nano new-freepbx-password.php
with the following:
Code:
<?php
$newpassword = 'somethingNEW123';
echo sha1($newpassword) ;
?>
Relace somethingNEW123 with whaetever you want your password to be, then
[root@localhost ~]# chmod a+x new-freepbx-password.php
[root@localhost ~]# php -f new-freepbx-password.php
4ae66o29caa73c1df52b483af56e636987b84ae5d
Note the whole 4ae66o.... number... or whatever you get as the output of the php -f command
[root@localhost ~]# /etc/init.d/mysqld stop
Stopping MySQL: [ OK ]
[root@localhost ~]# mysqld_safe --skip-grant-tables &
[1] 9050
[root@localhost ~]# Starting mysqld daemon with databases from /var/lib/mysql
[root@localhost ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use asterisk
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
Then issue the following command, take care to replace the 4ae66xxxxx string with whatever noted earlier.
mysql> update ampusers set password_sha1 = '4ae6629caa73c1df52b483af56e636987b84ae5d' where username = 'admin' limit 1 ;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@localhost ~]# /etc/init.d/mysqld restart
STOPPING server from pid file /var/run/mysqld/mysqld.pid
110817 15:39:20 mysqld ended
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[1]+ Done mysqld_safe --skip-grant-tables