Difference between revisions of "Password Recovery"
From FusionPBX
Line 7: | Line 7: | ||
− | #cat password.php | + | #cat password.php |
− | <?php | + | <?php |
− | $salt = "random-salt-goes-here"; | + | $salt = "random-salt-goes-here"; |
− | $password = "put your password here"; | + | $password = "put your password here"; |
− | echo md5($salt.$password); | + | echo md5($salt.$password); |
− | ?> | + | ?> |
Revision as of 03:49, 7 April 2013
Here some rough steps to change the password of the database. These are specific for sqlite, but can be used for other databases. The password can only be changed and not recovered.
- Install sqlite3 which can be be used to modify the database fusionpbx.db.
- The database contains a table called v_users which contains the username, password and salt. The password is the md5 hash of the password and the salt
- The hashed password and the salt can be updated using the command, update v_users set password = 'hashed_md5result', salt = 'salt-used-in-md5' where username = 'superadmin'
- The hashed_md5result can be obtained for a given 'password' and 'salt' using the following php script:
#cat password.php <?php $salt = "random-salt-goes-here"; $password = "put your password here"; echo md5($salt.$password); ?>