Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    167
    Likes Received:
    34
    Trophy Points:
    103
    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:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    ItsMattSon likes this.
  3. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    167
    Likes Received:
    34
    Trophy Points:
    103
    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:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Let us know how it goes. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    167
    Likes Received:
    34
    Trophy Points:
    103
    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:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Excellent. Thanks for updating the thread.

    You're welcome. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. ItsMattSon

    ItsMattSon Well-Known Member

    Joined:
    Sep 5, 2016
    Messages:
    167
    Likes Received:
    34
    Trophy Points:
    103
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice