MyPBX Standard V4 has an issue when updating from a very old firmware to latest in that the admin user password is mangled in the sqlite database. To remedy this we have to get direct access to the database. It is assumed that SSH has previously been enabled or you have serial access to the system, otherwise this technique will not work.


Tested on MyPBX Standard hardware version: MyPBX-Standard V4, firmware version: 2.18.0.22


From the command line we can edit the sqlite database directly.


# Open the database (if required find the database with command 'find / | grep MyPBX.sqlite')

sqlite3 /persistent/var/lib/asterisk/db/MyPBX.sqlite


# Switch on headers before listing the database entries

sqlite> .header on


# List the 'pwdsettings' database

sqlite> SELECT * FROM pwdsettings;


# Results

name|password|enable

admin|759f8c5febffed992456a2c3ca8aa791|0

cdr|5f4dcc3b5aa765d61d8327deb882cf99|0

user|5f4dcc3b5aa765d61d8327deb882cf99|0


# Enable the admin user

UPDATE pwdsettings

SET enable = 1

WHERE

  name = 'admin';


# Set the admin password to 'password'. Note it is set to the same as the 'cdr' & 'user' users which is 'password' by default.

sqlite> UPDATE pwdsettings

   ...> SET password = '5f4dcc3b5aa765d61d8327deb882cf99'

   ...> WHERE

   ...> name = 'admin';

   

# Quit sqlite3

sqlite> .quit