Locked out as admin because of 2fa (OD-2076)
brixomatic opened 1 year ago

For some reason. I the admin, probably after changing group settings, got the message that 2factor auth was enabled for my account. Now, if I scan the QR code with an app and enter the code it always tells me it is incorrect. Since I do have access to the mapped directory of onedev, can I somehow change/reset this setting?

  • Robin Shen commented 1 year ago

    You may reset admin password and it will also reset 2FA:

    https://docs.onedev.io/administration-guide/reset-admin-password

  • brixomatic commented 1 year ago

    That helped! 2FA didn't seem to work for me initially (using different apps), after reset it worked.

    Thanks for the quick reply!

  • Robin Shen changed state to 'Closed' 1 year ago
    Previous Value Current Value
    Open
    Closed
  • Zach Queal commented 10 months ago

    I've also just hit this issue.

    I enabled 2FA thinking it would clearly be OPTIONAL for accounts and not be required as per the verbiage; Check this to enable two-factor authentication for all users in the system. Ended up locking me out of my OneDev instance because the TOTP codes wouldn't verify at all... Probably something to do with time zones or something.

    But then I go to reset the admin password;

    [root@dev bin]# ./reset-admin-password.sh {password}
    Running OneDev Reset Admin Password...
    reset-admin-password.sh: line 1801: /var/lib/docker/volumes/onedev/bin/../boot/wrapper-linux-x86-64: cannot execute: required file not found
    

    I literally cannot reset the password... At this point the only thing I can do is completely reinstall OneDev, which is bonkers to me.

  • Robin Shen commented 10 months ago

    If you are running OneDev as docker container, the reset admin password needs to be executed inside the container.

issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2076
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover