Reset Admin Password

Asked by Andy N2

Hi,

I have forgotten my admin password.

Please can you tell me what encyption mechanism is used for the passwords on PHPNS so that I can change it in the command line.

Or is there a simply method to change the admin users password.

Any help would be most apprciated.

Andy

Question information

Language:
English Edit question
Status:
Solved
For:
phpns Edit question
Assignee:
No assignee Edit question
Solved by:
alecwh
Solved:
Last query:
Last reply:
Revision history for this message
Best alecwh (alecwh) said :
#1

The encryption is SHA-1, using PHP's sha1() function. There is no
built-in mechanism for resetting passwords, you'll need to do it with
mySQL (cli interface or whatever).

Revision history for this message
Andy N2 (andy-n2vis) said :
#2

thank you Alec, that worked fine.

Revision history for this message
Andy N2 (andy-n2vis) said :
#3

Thanks alecwh, that solved my question.

Revision history for this message
butch (ajcarp) said :
#4

can you please explain the above for tech challenged person. thanks.

Revision history for this message
alecwh (alecwh) said :
#5

If you have forgotten your admin password, and you have no other admin accounts on phpns, then you will need to reset your password manually.

That means, you need to go into the database of phpns with a program like phpMyAdmin (or the mysql command line client), go into the 'users' table, and edit your admin user row in that table. You will notice that the password in the password column is a long randomized string. That's because the password is hashed, and you will need to hash your password before you replace that password.

Use sha1(), which is a commonly used PHP function. After your hash it, just plug it into the password column on your admin account's row (using phpMyadmin or something).