I have recently attempted to change my passwords on FreePBX 2.9.0.7.
Firstly, you may wish to change the root password from time to time. To do this:
su to (or login as) root
Type “passwd” (without quotes)
It will then prompt you to type your new pass, and then to confirm it.
As for FreePBX itself… well,
It’s a while since I last did this, but the first thing I notice is that a google search comes up with these threads:
http://www.freepbx.org/support/documentation/faq/changing-the-asterisk-manager-password
and
http://www.freepbx.org/support/documentation/faq/changing-the-mysql-password
Be warned these are now both seriously out of date. I think it would be useful if a FreePBX staff member updated them.
I have discovered that FreePBX 2.9.0.7 does things rather differently. For a start you are no longer supposed to go hacking into the /etc/amportal.conf file. The passwords for the FOP (Flash Operator Panel) and User Portal Admin, are all now contained within the “Advanced Settings” page:
http://yourdomain/admin/config.php?type=tool&display=advancedsettings
Unfortunately this page does not seem to include the settings for the Asterisk Manager Username and Password. This is still hard-wired into /etc/asterisk/manager.conf. But before you go changing anything in there, I discovered that changing the corresponding entries in the /etc/amportal.conf file (AMPMGRPASS=your_manager_password & AMPMGRUSER=your_manager_user [default: admin]) seems to have no effect at all!
If you change the password in /etc/asterisk/manager.conf then the “Update Configuration Changes” process will fail when trying to run var/lib/asterisk/bin/retrieve_conf.
Now, this php routine calls a new file called /etc/freepbx.conf and lo-and-behold this now contains the MySQL DB passwords, formerly controlled by amportal.conf.
<?php $amp_conf['AMPDBUSER'] = "freepbx"; (normally the default) $amp_conf['AMPDBPASS'] = "your_DB_Password"; $amp_conf['AMPDBHOST'] = "localhost"; $amp_conf['AMPDBNAME'] = "asterisk"; $amp_conf['AMPDBENGINE'] = "mysql"; $amp_conf['datasource'] = ""; require_once('/var/www/html/admin/bootstrap.php'); So, evidently the /etc/freepbx.conf file is the new location in which to change your main mysql DB passwords. Alas, there is still no sign of the corresponding Manager Passwords to match the changes made in /etc/asterisk/manager.conf. If anyone can advise how to do this, please reply here! :-) However, the good news is this is where you will need to change the main password for your FreePBX login. Having done this, you will also need to change the password under MySQL for the user 'freepbx'. The most successful method for me, (ahem... well actually the *only* successful method for me), was as follows. su or logon to the CLI command prompt as root, then type: [[email protected]]# mysql -u root You will then be taken to the mysql console. At the mysql prompt, type the following: mysql> SET PASSWORD FOR [email protected]=PASSWORD('new_password'); ...where 'new_password' is your choice. Don't forget the capitalisation and you will *need to keep the single quotes* inside the brackets! If the command is successful, mysql will respond with: Query OK, 0 rows affected (0.00 sec) mysql> To exit the mysql console type 'quit' (this time without the quotes) to be returned to the CLI. To test the password has been successfully changed, type the following at the CLI: [[email protected]]# mysql -u freepbx -p You will then be prompted for the password you just entered. If you enter it successfully, you will be taken back to the mysql console prompt: mysql> Type 'quit' again to exit back to the CLI. Having changed your MySQL password in both the mysql console and the /etc/freepbx.conf file, you will need to modify one further file: edit /etc/asterisk/cdr_mysql.conf as follows: [global] hostname = localhost dbname=asteriskcdrdb password = new_password <------ user = freepbx userfield=1 ;port=3306 ;sock=/tmp/mysql.sock Having completed all the changes then at the CLI type: [[email protected]]# amportal restart ...and cross your fingers. Hope this helps someone. :-)