Jump to the post that solved this thread.
Solved: 6 Years, 4 Months, 4 Weeks ago How to login using TWO-FACTOR AUTHENTICATION ??
#1
Solved: 6 Years, 4 Months, 4 Weeks ago
First i downloaded the google apps for that. And i scanned the barcode. But when try to login back to the admin cp.. The Authentication code is not valid Sad

And now my account was locked.. Help....
Reply
#2
Solved: 6 Years, 4 Months, 4 Weeks ago
try this and see if it helps....

(2015-02-17, 07:07 PM)JordanMussi Wrote: It may be that your app is out of sync with Google servers.
With an internet connection: Open Google Authenticator -> Settings -> Time correction for codes -> Sync now

EDIT: did you copy the recovery codes...
We can't help everyone, but everyone can help someone - Ronald Reagan
Did you know? Your question has already been answered. But you haven't searched it yet.
Don’t  Forget to “Mark as Solved” after the fix
Reply
#3
Solved: 6 Years, 4 Months, 4 Weeks ago
time already correct.. btw, what you mean with recovery codes ??
Reply
#4
Solved: 6 Years, 4 Months, 4 Weeks ago
Recovery codes are like backup codes, in case anything goes wrong.... if you didnt knew it, its certain you didnt copy it...

After you enable 2FA, you will be presented with a link with the recovery codes, above the QR code.. clicking that link, will provide you a list of recovery codes which can be used only once...

for your issue, Run this SQL query in phpMyAdmin.... Read this to know How to run SQL Queries.... change the uid (if yours is not 1) to match yours...

UPDATE `mybb_adminoptions` SET `2fasecret` =  '' WHERE  `uid` = 1;
We can't help everyone, but everyone can help someone - Ronald Reagan
Did you know? Your question has already been answered. But you haven't searched it yet.
Don’t  Forget to “Mark as Solved” after the fix
Reply
#5
Solved: 6 Years, 4 Months, 4 Weeks ago
ok thanks.. will try later Big Grin
Reply
#6
Solved: 6 Years, 4 Months, 4 Weeks ago
(2015-02-24, 01:44 PM)mmadhankumar Wrote: Recovery codes are like backup codes, in case anything goes wrong.... if you didnt knew it, its certain you didnt copy it...
for your issue, Run this SQL query in phpMyAdmin.... Read this to know How to run SQL Queries.... change the uid (if yours is not 1) to match yours...

UPDATE `mybb_adminoptions` SET `2fasecret` =  '' WHERE  `uid` = 1;

And what if some terrible dimwit lost the recovery codes for Google Authenticator 2FA...? Could they fix it with FTP access...? Currently I can't log in so no database queries for me (unless I'm missing something here)? So which file to fetch and edit? It's been a long time since I last used the forum (which still is running Smile )

Peace!

Devnullius
Reply
#7
Solved: 6 Years, 4 Months, 4 Weeks ago
^ basically database queries are executed using a database manager at the web host control panel (eg. phpMyAdmin)
please see How to run SQL Queries guidance for further reference. (its link was provided in your above quoted response)

related SQL queries :
UPDATE `mybb_adminoptions` SET `authsecret` =  '' WHERE  `uid` = 1;
UPDATE `mybb_adminoptions` SET `loginlockoutexpiry` =  '0' WHERE  `uid` = 1;
UPDATE `mybb_adminoptions` SET `loginattempts` =  '0' WHERE  `uid` = 1;
Reply
#8
Solved: 6 Years, 4 Months, 4 Weeks ago
(2017-06-27, 04:21 PM).m. Wrote: ^ basically database queries are executed using a database manager at the web host control panel (eg. phpMyAdmin)
please see How to run SQL Queries guidance for further reference. (its link was provided in your above quoted response)

related SQL queries :
UPDATE `mybb_adminoptions` SET `authsecret` =  '' WHERE  `uid` = 1;
UPDATE `mybb_adminoptions` SET `loginlockoutexpiry` =  '0' WHERE  `uid` = 1;
UPDATE `mybb_adminoptions` SET `loginattempts` =  '0' WHERE  `uid` = 1;

oooh... this is not from mybb directly... Ok, I'll see what URLs and credentials I can dig up. Thanks so far!

xx

Devvie

I got this follow up through PM - so I assume one wants to remain anonymous? I thought to share it with you guys non the less! Smile

Quote:if you want to try fixing it through ftp then

you can add below code to a php file (eg. 2fsecret.php)
and upload it to main folder of your forum where you
have global.php file & visit the file through your browser

<?php
define('IN_MYBB', 1);
require_once "global.php";


       $db->write_query("UPDATE " . TABLE_PREFIX . "adminoptions SET `authsecret`='' WHERE uid='1'");
echo ("Done authsecret.");
$db->write_query("UPDATE " . TABLE_PREFIX . "adminoptions SET `loginlockoutexpiry`='0' WHERE uid='1'");
echo ("Done loginlockoutexpiry.");
$db->write_query("UPDATE " . TABLE_PREFIX . "adminoptions SET `loginattempts`='0' WHERE uid='1'");
echo ("Done loginattempts."); 

remember to delete the newly added file after using it.

I just ran the PHP script - and while it gave all Dones, I am still greeted with a 2FA login prompt. So for me the PHP script seems to fail after all. Time for that database hacking I assume.

Thanks though!
Reply
#9
Solved: 6 Years, 4 Months, 4 Weeks ago
^ exactly which version of MyBB you are using & is your used id equals to 1 (one) on your forum ?
Reply
#10
Solved: 6 Years, 4 Months, 4 Weeks ago
(2017-06-27, 06:04 PM).m. Wrote: ^ exactly which version of MyBB you are using & is your used id equals to 1 (one) on your forum ?

Good questions. -M- Asked the same and I indeed have been securing my forum as much as possible. While he sleeps, I await support from my hosting provider. If I go to cpanel --> phpMyAdmin, nothing there works. I haven't updated anything in quite a while (I kinda abandoned it for a while to the pleasure of the Chinese). But when I am logged in, none of the links work (and if I force open them, I only get white pages). Also, all images are gone. It looks like I updated a bunch of things, but I haven't since my last login. I did get a forced 'request' to update the database, which I did and was quickly done... Worst case scenario that did more than I expected...

More to come Smile And thanks!

Devvie
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)