MyBB Community Forums

Full Version: Admin Super user Password hacked!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,
I just want to ask if its possible to get back mybb administrative pass If its hacked!
Is there a way to reset from site root!

Thanks and regards.

UPDATE mybb_users SET password = '098f6bcd4621d373cade4e832627b4f6', salt = '' WHERE uid = 'x'; 

Replace x with the user id, usually 1.

The password will be test
^^ Run that in phpmyadmin
You can also do it inline so you don't have to change it after you log in:

UPDATE `mybb_users` SET `password`=MD5('newpassword'), `salt`='' WHERE `uid`=1;
Thank you all for replies.
Where are these lines?
What is the name of the file that I have to modify inside?

Thanks again Smile
Hi, you need to use a utility to run commands to your database, such as phpMyAdmin.

But, that's besides the point, once again. The more important matter is how did you get hacked in the first place, and how are you convinced that the hacker only changed your password?

You should report this to your hosting solution first, and then depending on their response, have them email the attack description to the MyBB development team if it was a fault of the software.

In addition, you can use a regular password like "test" using phpMyAdmin, MyBB should automatically encrypt it.
You could do this:
Create a new file in root:
<?php
define("IN_MYBB",1);
include("./global.php");
$db->query("UPDATE `mybb_users` SET `password`=MD5('newpassword'), `salt`='' WHERE `uid`=1; ");
?>