Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Admin password recovery

how can i do that ??
i lost that admin pass coz i didn't use it since the installation .
i need it now to edit the panels section
If no access to phpMyadmin, then make a php file with this content:

CodeDownload  
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: viewpage.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";

$pass = MD5('mynewpass'); // <-- Enter new user password 'mynewpass'
$pass_admin = MD5('mynewadminpass'); // <-- Enter new admin password 'mynewadminpass'

$result = dbquery("UPDATE ".DB_USERS." SET user_password = MD5('".$pass."') WHERE  user_id = '1' LIMIT 1");
if ($result) {echo "pass changed for super admin in ".DB_USERS;}
else {echo "An error ocurred for user pass.";}

$result2 = dbquery("UPDATE ".DB_USERS." SET user_admin_password = MD5('".$pass_admin."') WHERE  user_id = '1' LIMIT 1");
if ($result) {echo "<br />admin pass changed for super admin in ".DB_USERS;}
else {echo "<br />An error ocurred for admin pass.";}

require_once THEMES."templates/footer.php";
?>



Edit $pass and $pass_admin to your new passwords.

Upload file to the root of your site.

Execute file in browser.

Delete file from your site.

Log in with new passwords.
thanks guys ,
WEC , thanks , it worked

Quote

Neoman wrote:
WEC , thanks , it worked

How?? In WEC's code, the passwords are only md5 hashed once. PHP-Fusion 7 uses double md5 hashing.

Quote

googlebot wrote:

Quote

Neoman wrote:
WEC , thanks , it worked

How?? In WEC's code, the passwords are only md5 hashed once. PHP-Fusion 7 uses double md5 hashing.


yes someone please tell us how this works

is 2x md5 not like this ?
example
md5 string: 1
md5 hash: c4ca4238a0b923820dcc509a6f75849b
md5 string: c4ca4238a0b923820dcc509a6f75849b
md5 hash: 28c8edde3d61a0411511d3b1866f0636

Quote

SiteMaster wrote:

Quote

googlebot wrote:

Quote

Neoman wrote:
WEC , thanks , it worked

How?? In WEC's code, the passwords are only md5 hashed once. PHP-Fusion 7 uses double md5 hashing.


yes someone please tell us how this works

is 2x md5 not like this ?
example
md5 string: 1
md5 hash: c4ca4238a0b923820dcc509a6f75849b
md5 string: c4ca4238a0b923820dcc509a6f75849b
md5 hash: 28c8edde3d61a0411511d3b1866f0636

That is how it should have happened. But either Neoman didn't try it, or he modded v7 to only use one md5 hash (doubt it).
DOH he is duoble md5 it

first time
CodeDownload  

$pass = MD5('mynewpass'); // <-- Enter new user password 'mynewpass'
$pass_admin = MD5('mynewadminpass'); // <-- Enter new admin password 'mynewadminpass'



second time
CodeDownload  

$result = dbquery("UPDATE ".DB_USERS." SET user_password = MD5('".$pass."') WHERE  user_id = '1' LIMIT 1");
$result2 = dbquery("UPDATE ".DB_USERS." SET user_admin_password = MD5('".$pass_admin."') WHERE  user_id = '1' LIMIT 1");

Quote

SiteMaster wrote:
DOH he is duoble md5 it

first time
CodeDownload  

$pass = MD5('mynewpass'); // <-- Enter new user password 'mynewpass'
$pass_admin = MD5('mynewadminpass'); // <-- Enter new admin password 'mynewadminpass'



second time
CodeDownload  

$result = dbquery("UPDATE ".DB_USERS." SET user_password = MD5('".$pass."') WHERE  user_id = '1' LIMIT 1");
$result2 = dbquery("UPDATE ".DB_USERS." SET user_admin_password = MD5('".$pass_admin."') WHERE  user_id = '1' LIMIT 1");


Oh, my bad - didn't look in the dbupdate...
i didn't o anything to PF . i just copied the code to a page in my root and opened it . that is it !

Quote

Neoman wrote:
i didn't o anything to PF . i just copied the code to a page in my root and opened it . that is it !

Yes, we know. We were being lazy and didn't look through the whole code. Php-Fusion 7 requires a double md5 hashed password. I still don't understand why WEC didn't just use md5(md5(...))
It doset work. now i can not log in at all.. plzz help

Merged on Sep 21 2011 at 10:22:20:
and now i can not get a new password... what do i do?

Merged on Sep 21 2011 at 10:29:14:
ik got php my admin how do i change it there?
Try to use
change: YOURPREFIX_users and YOURPASSWORD

Quote

---

UPDATE YOURPREFIX_users SET user_admin_password = md5(md5('YOURPASSWORD'wink),user_admin_algo='md5', user_algo='md5',user_password=md5(md5('YOURPASSWORD'wink) WHERE user_id = '1' LIMIT 1;

After that, you password will be YOURPASSWORD

Quote

PolarFox wrote:

Try to use
change: YOURPREFIX_users and YOURPASSWORD

Quote

---

UPDATE YOURPREFIX_users SET user_admin_password = md5(md5('YOURPASSWORD')),user_admin_algo='md5', user_algo='md5',user_password=md5(md5('YOURPASSWORD')) WHERE user_id = '1' LIMIT 1;

After that, you password will be YOURPASSWORD



sorry how do i use that?
is this the hole code? or?
And what shut i change this into YOURPREFIX_users
You said

Quote

ik got php my admin how do i change it there?
it's the code for PMA.

Prefix you can find in your config.php .
okay im totaly lost. i have no ide how to do that. :(
Here is the code for php page:
call it page.php , upload to the root dir, and direct your browser to yoursite.com/page.php

CodeDownload  
<?php
require_once 'maincore.php';

$pass = 'yourpass';
$passadm = 'youradminpass';

dbquery("UPDATE ".DB_USERS." SET user_admin_password = md5(md5('$passadm')),user_admin_algo='md5', user_algo='md5',user_password=md5(md5('$pass')) WHERE user_id = '1' LIMIT 1;");

echo 'Done';
?>


This code will reset your password to specified.

Remove this file after use! And make a DB backup at first.
Thx i try that. :)

Quote

PolarFox wrote:

Here is the code for php page:
call it page.php , upload to the root dir, and direct your browser to yoursite.com/page.php

CodeDownload  
<?php
require_once 'maincore.php';

$pass = 'yourpass';
$passadm = 'youradminpass';

dbquery("UPDATE ".DB_USERS." SET user_admin_password = md5(md5('$passadm')),user_admin_algo='md5', user_algo='md5',user_password=md5(md5('$pass')) WHERE user_id = '1' LIMIT 1;");

echo 'Done';
?>


This code will reset your password to specified.

Remove this file after use! And make a DB backup at first.

Thanks!!! I reset my admin password!!!
Thread Information
Author
Replies
24 posts
Views
16,258 times
Last Post
Last updated on 2 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.