Lock/Disable and Unlock/Enable a User

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Admin, Security
    • None
    • Server Security
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Please provide the ability to lock/disable and unlock/enable a user account.

      The user can login

      $ mongo test -u author -p pass
      MongoDB shell version: 2.4.8
      connecting to: test
      > 
      

      Now admin locks/disables the user

      > db.lockUser("author")
      

      The user can't login

      $ mongo test -u author -p pass
      MongoDB shell version: 2.4.8
      connecting to: test
      Fri Feb 21 10:17:40.514 Error: 18 { code: 18, ok: 0.0, errmsg: "auth fails" } at src/mongo/shell/db.js:228
      exception: login failed
      

      Unlock the user

      > db.unlockUser("author")
      

      And now author can login again

      $ mongo test -u author -p pass
      MongoDB shell version: 2.4.8
      connecting to: test
      > 
      

              Assignee:
              [DO NOT USE] Backlog - Security Team
              Reporter:
              Ger Hartnett
              Votes:
              15 Vote for this issue
              Watchers:
              30 Start watching this issue

                Created:
                Updated: