How to change PBX GUI admin password from command line

If you cannot remember your  FPBX GUI admin password, this procedure enables you to change it from a linux command line.

Assuming our new password is somenewpassword, type the following from linux command prompt:

echo -n 'somenewpassword' | sha1sum | cut -d' ' -f1


You will get a long number like:

e8c36c9b6fee0e438e15aa073349cf718ddd2f29


log in to asterisk database

mysql -u AMPDBUSER -p asterisk


Replace AMPDBUSER with the value found in /etc/freepbx.conf or /etc/amportal.conf.  When it asks for password, use the value of AMPDBPASS in the same files.

Alternatively, you can log in with root user.  If you cannot get root access to MySQL because you don't know the password, then this article explains how to change it.


Check that the default user is admin, otherwise replace with the alternate username.

mysql> select * from ampusers;


Now enter the following command from mysql command prompt mysql>.

mysql> update ampusers set password_sha1 = 'e8c36c9b6fee0e438e15aa073349cf718ddd2f29' 
where username = 'admin' limit 1;


Now you should be able to log into the Admin GUI with username: admin, password: somenewpassword

 

  • freepbx, admin, administrator, password

Kapcsolódó cikkek

I have a bunch of anonymous call attempts showing up in my call logs

I have a bunch of calls that look something like this in the call logs. 2011-11-18...

Do I need to do anything on the server/linux side of things?

You should not have to do anything on the server/linux side unless you want to tweak things or...

How hard is it to upgrade my server?

Upgrading resources such as memory, processing, hard drive space is instantaneous and does not...

Do you automatically upgrade our software when a newer version comes out?

Software upgrades are not automatic because they usually require service interruption.  We can...

Do you provided automatic backups.

Our premium plan includes automatic online backups.  All other plans can be backed up manually...