MyBB Community Forums
[Security] i can not recover my admin password. - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [Security] i can not recover my admin password. (/thread-219253.html)

Pages: 1 2


i can not recover my admin password. - gunrose2003 - 2018-08-14

Hi 

my site was hacked several days ago, i tried to use  this code in PHPMYADMIN
UPDATE `mybb_users` SET `password` = md5('test'), `salt` = '' WHERE `uid` = '1';

and 

also tried this 
UPDATE `mybb_users` SET `salt` = '', `password` = '098f6bcd4621d373cade4e832627b4f6' WHERE `uid` = '1';

The mysql showed the execute success, but i still can not login it. 

also "admin" login, showed:

Your account is currently locked out after failing to login 5 times. You have been sent an email with instructions on how to unlock your account.

And i tried this code, but it does not work.

UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = 'X'; 

whats happened ?
how to solve this problem?

URL: www.rice21.com

Thank you.


RE: i can not recover my admin password. - Michael2014 - 2018-08-14

This happened to me, and I also thought I was hacked, in the end, it was me doing something dumb, because I couldn't log in and got locked out, I remember getting the email and the instructions worked, did you get the email with the instructions?


RE: i can not recover my admin password. - gunrose2003 - 2018-08-14

(2018-08-14, 04:22 AM)Michael2014 Wrote: This happened to me, and I also thought I was hacked, in the end, it was me doing something dumb, because I couldn't log in and got locked out, I remember getting the email and the instructions worked, did you get the email with the instructions?

i did not get any email with the instructions. i think that MYBB should have some bugs of the security section.


RE: i can not recover my admin password. - .m. - 2018-08-14

once again try using below SQL queries
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1';
UPDATE `mybb_users` SET `salt` = '', `password` = 'actualRequiredPassword' WHERE `uid` = '1';



RE: i can not recover my admin password. - gunrose2003 - 2018-08-14

(2018-08-14, 05:27 AM).m. Wrote: once again try using below SQL queries
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1';
UPDATE `mybb_users` SET `salt` = '', `password` = 'actualRequiredPassword' WHERE `uid` = '1';

i tried 
 0 rows affected. (Query took 0.0003 seconds.)
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1'

 0 rows affected. (Query took 0.0004 seconds.)
UPDATE `mybb_users` SET `salt` = '', `password` = 'test' WHERE `uid` = '1'
it seem does not work


RE: i can not recover my admin password. - Serpius - 2018-08-14

(2018-08-14, 07:28 AM)gunrose2003 Wrote:
(2018-08-14, 05:27 AM).m. Wrote: once again try using below SQL queries
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1';
UPDATE `mybb_users` SET `salt` = '', `password` = 'actualRequiredPassword' WHERE `uid` = '1';

i tried 
 0 rows affected. (Query took 0.0003 seconds.)
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1'

 0 rows affected. (Query took 0.0004 seconds.)
UPDATE `mybb_users` SET `salt` = '', `password` = 'test' WHERE `uid` = '1'
it seem does not work

See this prefix? mybb_ That's the default prefix that MyBB uses during the first installation.

Are you using the SAME prefix or are you using a different prefix for your database?

When you are in the SQL query, double check to make sure you're using the correct prefix.


RE: i can not recover my admin password. - .m. - 2018-08-14

Serpius has a valid point.

perhaps its better to manually register a new user account (by using another working email account)
and temporarily change its user group to admin group, login to forum admin panel & change password
of the main admin
...

UPDATE `mybb_users` SET `usergroup` = '4' WHERE `uid` = 'X'; 



RE: i can not recover my admin password. - gunrose2003 - 2018-08-14

(2018-08-14, 07:37 AM)Serpius Wrote:
(2018-08-14, 07:28 AM)gunrose2003 Wrote:
(2018-08-14, 05:27 AM).m. Wrote: once again try using below SQL queries
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1';
UPDATE `mybb_users` SET `salt` = '', `password` = 'actualRequiredPassword' WHERE `uid` = '1';

i tried 
 0 rows affected. (Query took 0.0003 seconds.)
UPDATE `mybb_adminoptions` SET `loginattempts` = '0', `loginlockoutexpiry` = '0' WHERE `uid` = '1'

 0 rows affected. (Query took 0.0004 seconds.)
UPDATE `mybb_users` SET `salt` = '', `password` = 'test' WHERE `uid` = '1'
it seem does not work

See this prefix? mybb_ That's the default prefix that MyBB uses during the first installation.

Are you using the SAME prefix or are you using a different prefix for your database?

When you are in the SQL query, double check to make sure you're using the correct prefix.
I did not change any prefix before.

(2018-08-14, 07:49 AM).m. Wrote: Serpius has a valid point.

perhaps its better to manually register a new user account (by using another working email account)
and temporarily change its user group to admin group, login to forum admin panel & change password
of the main admin
...

UPDATE `mybb_users` SET `usergroup` = '4' WHERE `uid` = 'X'; 

I tried to registered a new user account, but the problem is that i can not find my new account id/UID in "mybb_users",
Whats happened ?


RE: i can not recover my admin password. - .m. - 2018-08-14

have a look at your new user account's profile & hover mouse pointer over sending email / pm link
that gives your new user account's uid [uid = 774]
UPDATE `mybb_users` SET `usergroup` = '4' WHERE `uid` = '774'; 



RE: i can not recover my admin password. - gunrose2003 - 2018-08-14

(2018-08-14, 10:57 AM).m. Wrote: have a look at your new user account's profile  & hover mouse pointer over sending email / pm link
that gives your new user account's uid [uid = 774]
UPDATE `mybb_users` SET `usergroup` = '4' WHERE `uid` = '774'; 

Hi m,

It showed:
 0 rows affected. (Query took 0.0003 seconds.)
UPDATE `mybb_users` SET `usergroup` = '4' WHERE `uid` = '774'