Author Topic: [FREE] fjSnippet #5 - Admin Password Reset v1.0  (Read 5699 times)

0 Members and 1 Guest are viewing this topic.

  • Business Owner
  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 439
  • Karma: +45/-39
  • Lets Work Together
  • Referrals: 5
    • Revenue Sharing Program
[FREE] fjSnippet #5 - Admin Password Reset v1.0
« on: February 19, 2013, 04:09:02 PM »
This may be helpful to site owners using an aurora base script and they have locked themselves out of their admin menus. Plus it is a quick way to see who has admin access if you are suspicious that someone you do not want has admin access.

Reseting your admin password....

- Create a text file and copy the following code to the file.
- Save the file as editpassword.php The filename doesn't really matter as long as the extension is php.
- Upload the file to your admin2 folder.
- Execute the file using your site url; for example and you will have a list of all the usernames with admin priveleges
- Execute the file using your site url; for example and you will change the password for the username admin to admin

When you are done you can just delete the file and ftp it to your server if you need it again.

Very Important: Do not use the sample name I provided and leave the file on your server. Also, it is good practice to password protect your admin2 folder.

Code: [Select]


$connection mysql_connect($DBHost$DBUser$DBPassword) or die(mysql_error());
$db mysql_select_db($DBDatabase,$connection) or die(mysql_error());
$query_string "SELECT username, password FROM `user` where permission = 7";
$result_id mysql_query($query_string$connection);

$row mysql_fetch_row($result_id)) {
$row[0] . " " $row[1] . "<br /> ";
$query_string "update user set password = '21232f297a57a5a743894a0e4a801fc3' where username = '$updateuser'";
"<br />Password for " $updateuser " was changed to admin";


<br /><br />editpassword.php will display all members with admin priveleges.<br />
editpassword.php?u=xxxx where xxxx is a username with admin privelege will have its password reset to admin
« Last Edit: February 21, 2013, 11:36:34 AM by fjworld »