How to change default Asterisk Manager password and default username/password for accessing the FreePBX portal

The default manager password is located in the /etc/asterisk/manager.conf file:

[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0

The first part [admin] is the user name, secret is the password.

Notice the two important lines:
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0

That means that only localhost can authenticate with this user name/password. So no problem using it.

If you change it, you need to change at at least two places, first in manager.conf then in /etc/amportal.conf

AMPMGRUSER: the user to access the Asterisk manager interface

AMPMGRUSER=admin

AMPMGRPASS: the password for AMPMGRUSER

AMPMGRPASS=amp111

Make sure that both file changes match.
Then you need to do an amportal stop followed by an amportal start.

Before you even try to mess with the passwords, do make a copy of all file BEFORE you change them.