The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Disable 2FA via SSH?

Discussion in 'General Discussion' started by ItsMattSon, Feb 12, 2017.

  1. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    125
    Likes Received:
    27
    Trophy Points:
    28
    Location:
    Perth
    cPanel Access Level:
    Root Administrator
    Hi guys,

    Is it possible to disable 2FA via SSH>root?

    Considering creating a Feature Request as I lost my phone the other week and thought I was stuffed. Luckily I found it again shortly after!
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    ItsMattSon likes this.
  3. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    125
    Likes Received:
    27
    Trophy Points:
    28
    Location:
    Perth
    cPanel Access Level:
    Root Administrator
    Thanks @Infopro! It certainly did help. If I understood it correctly, I can run whmapi1 twofactorauth_disable_policy as root and it'll do the trick. Thanks again :)
     
    Infopro likes this.
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Let us know how it goes. :)
     
  5. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    125
    Likes Received:
    27
    Trophy Points:
    28
    Location:
    Perth
    cPanel Access Level:
    Root Administrator
    It worked perfectly! Just as a test so I can rely on it in future if I have to, I ran that command as root and logged back into WHM and Security Center > Two-Factor Authentication was Disabled.

    [root@srv /]# whmapi1 twofactorauth_disable_policy
    ---
    metadata:
    command: twofactorauth_disable_policy
    reason: OK
    result: 1
    version: 1

    Much appreciated, Infopro. All sorted :)
     
    Infopro likes this.
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Excellent. Thanks for updating the thread.

    You're welcome. :)
     
  7. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    125
    Likes Received:
    27
    Trophy Points:
    28
    Location:
    Perth
    cPanel Access Level:
    Root Administrator
    Just a quick FYI on top of my last post;

    When you're back into WHM and go back to Security Center > Two-Factor Authentication, before you Enable it again, go to Manage My Account and click Remove Two-Factor Authentication (for WHM) or you'll be immediately asked for the code you don't have (unless you screenshotted the QR originally I suppose) :p
     
    cPanelMichael likes this.
Loading...

Share This Page