Changing the Asterisk manager password

Changing the Asterisk manager password

Changing the username or password on 2.10 and beyond
If changing the username or password on 2.10 or beyond, you just go to Advanced Settings and make the change there. Everything else is done automatically an all the information below does not pertain.
Changing the username or password on 2.9
On 2.9, you no longer edit amportal.conf. That file is now generated and all settings are handled in Advanced Settings. Therefore you should make sure to make the changes in Advanced Settings first to assure it get's updated in the database. Then you can make the changes to the configuration files. If the "timing" isn't right, you may end up having to go into the Asterisk CLI and doing a reload to get everything updated.
Your best bet is to just upgrade to 2.10 first, then you can make the changes as described above which avoids complications.
Changing the username or password on older systems

If you are using the default password, you will see the message:

Warning: You are running FreePBX and Asterisk with the default manager pass. You should consider changing this to something else.

Running with the default password is a bad idea, simply because everyone else in the world knows it, and (if not properly firewalled, etc etc) could potentially connect to your asterisk box and do bad things(tm).

Warning: Don't get cute and try to use a password with non-alphabetic or non-numeric characters - things may break in strange ways if you try to use punctuation characters in passwords. Unless you really know what you are doing, stick to numbers and standard alphabetic characters. Also, you should probably read the comments below, to understand the importance of making a full backup before changing anything in case something goes wrong.

Changing the password

To do this, you need to edit two files: /etc/asterisk/manager.conf and /etc/amportal.conf

manager.conf

This controls the asterisk 'manager' users that are allowed to connect to the asterisk manager interface.

For full information on the file, see http://www.voip-info.org/wiki/index.php?page=Asterisk+config+manager.conf

You can have as many users in here as you'd like (for example, an operator panel might use one) and in fact, you should have different users for each application.

FreePBX requires a user that has a definition like the following:

[admin]
secret = secret123password
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

amportal.conf

There needs to be a corresponding entry in /etc/amportal.conf

AMPMGRUSER=admin
AMPMGRPASS=secret123password

Obviously you just need to use the same username (inside the square brackets) and password as above.

Once you have made the changes, you need to click on "Apply Configuration Changes" in order for the change to propagate throughout the system (If you don't see the orange "Apply Configuration Changes" bar, go to one of the GUI screens in the system and re-submit the page, no changes necessary). If you don't do this, then extensions_additional.conf will have stale data resulting in a broken phone system.