Post by AwesomeSoap » Tue Aug 29, 2023 7:21 am

As the opencart admin, I enabled two factor authentication. I did not think enabling it would immediately block me from using the admin account until the pin was sent and entered in the field. After saving, it immediately requests a code which gets sent to my (correctly entered) email, but as opencart is installed in a vm, I cannot receive it. I don't want to connect the vm to the internet just yet and while I've played around with postfix and mailutils hoping to catch the email being sent in a mailbox, I haven't had any luck yet.
I've tried looking at the opencart database tables for any settings related to 2fa and I found some mail settings in oc_settings (where oc_ is the default prefix), but no two-auth.

I cannot access my admin account until 2fa is disabled/reverted or I start over. How can I recover my account / what settings do I need to change and where to disable 2fa? Thank you in advance.

Opencart 4.0.2.2
PHP 8.1.16

Newbie

Posts

Joined
Tue Aug 29, 2023 6:53 am

Post by softmonke » Tue Aug 29, 2023 9:58 pm

AwesomeSoap wrote:
Tue Aug 29, 2023 7:21 am
As the opencart admin, I enabled two factor authentication. I did not think enabling it would immediately block me from using the admin account until the pin was sent and entered in the field. After saving, it immediately requests a code which gets sent to my (correctly entered) email, but as opencart is installed in a vm, I cannot receive it. I don't want to connect the vm to the internet just yet and while I've played around with postfix and mailutils hoping to catch the email being sent in a mailbox, I haven't had any luck yet.
I've tried looking at the opencart database tables for any settings related to 2fa and I found some mail settings in oc_settings (where oc_ is the default prefix), but no two-auth.

I cannot access my admin account until 2fa is disabled/reverted or I start over. How can I recover my account / what settings do I need to change and where to disable 2fa? Thank you in advance.

Opencart 4.0.2.2
PHP 8.1.16
Since you have access to your database, simply go to the "setting" table, and search for "config_security" under the "key" column. Simply delete the entire row and 2FA should be disabled. Alternatively, you could run the following SQL query:

Code: Select all

DELETE FROM oc_setting WHERE `key` = 'config_security'
where "oc_" is your DB_PREFIX set in "config.php".

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by teachableginger » Sun Apr 14, 2024 10:29 am

Hi, I am having the same problem, but I am not familiar with open cart database tables. Is that something I can find in cPanel? Like in the file manager? Thank you. Sorry I’m a newbie.
Last edited by teachableginger on Mon Apr 15, 2024 10:55 pm, edited 1 time in total.


Posts

Joined
Sun Apr 14, 2024 10:13 am

Post by ADD Creative » Sun Apr 14, 2024 10:57 pm

teachableginger wrote:
Sun Apr 14, 2024 10:29 am
Hi, I am having the same problem, but I am not familiar with open cart database tables. Is that something I can find in cPanel? Like in the file manager? Thank you. Sorry I’m a newbie.
You can use phpMyAdmin under Databases in cPanel to see and modify your databases.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by teachableginger » Mon Apr 15, 2024 2:09 am

Thank you!
Got it working 😁


Posts

Joined
Sun Apr 14, 2024 10:13 am

Post by JNeuhoff » Mon Apr 15, 2024 6:48 pm

teachableginger wrote:
Mon Apr 15, 2024 2:09 am
Thank you!
Got it working 😁
Great! Now that it is working please add '[SOLVED]' to the beginning of your forum thread title.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Tue Apr 16, 2024 9:42 pm

JNeuhoff wrote:
Mon Apr 15, 2024 6:48 pm
teachableginger wrote:
Mon Apr 15, 2024 2:09 am
Thank you!
Got it working 😁
Great! Now that it is working please add '[SOLVED]' to the beginning of your forum thread title.
I added it this time as the OP didn't.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: johnp and 7 guests