As another option to reset 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
www.yoursite.com/admin2/editpassword.php and you will have a list of all the usernames with admin priveleges
- Execute the file using your site url; for example
www.yoursite.com/admin2/editpassword.php?u=admin and you will change the password for the username admin to admin
When you are done you can just rename the file to something less obvious or delete it.
<?php
$updateuser = $_GET['u'];
include("../config.php");
$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);
while($row = mysql_fetch_row($result_id)) {
echo $row[0] . " " . $row[1] . "<br /> ";
}
$query_string = "update user set password = '21232f297a57a5a743894a0e4a801fc3' where username = '$updateuser'";
mysql_query($query_string);
echo $query_string;
echo "<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