Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save imravichaudhary/a69a064db2b2879023519822b6ec6842 to your computer and use it in GitHub Desktop.
Save imravichaudhary/a69a064db2b2879023519822b6ec6842 to your computer and use it in GitHub Desktop.
Unlock and reset account in Mongo Ops Manager when SMTP not set up

To unlock the account in Mongo Ops Manager when smtp not setup

  • Connect the Mongo Ops Manager AppDB using Mongo Shell
  • Run below command
  • use mmsdbconfig
  • db.config.users.update({"un": ""}, {$set: {"isLocked": false, lastPageView: new Date()}})

To reset the account in Mongo Ops Manager when smtp not setup

  • Click on the reset password link from the ops manager login page
  • Enter your email id and click submit
  • Connect to Mongo Ops Manager AppDB using Mongo Shell
  • Run below command
  • use mmsdbconfig
  • db.config.passwordReset.find()
  • Copy the _id value for the document which contain your email id
  • Go to the follow link
    • http://<OPS-MANAGER-HOSTNAME>:<PORT>/user/reset/password/<Replace-With-_id-value>
  • You should now be able to set your new password
@synetalsolutions
Copy link

What is the way to unlock the account if two factor authentication is enable.. I have mongops shell access..

@imravichaudhary
Copy link
Author

@synetalsolutions These steps performed when two-factor authentication was disabled. Maybe you can give it a shot and let us know if these steps work with 2FA enabled.

@synetalsolutions
Copy link

These steps performed when two-factor authentication was disabled. Maybe you can give it a shot and let us know if these steps work with 2FA enabled.

which steps..

@imravichaudhary
Copy link
Author

These steps performed when two-factor authentication was disabled. Maybe you can give it a shot and let us know if these steps work with 2FA enabled.

which steps..

Steps listed in this gist: https://gist.github.com/imravichaudhary/a69a064db2b2879023519822b6ec6842#to-unlock-the-account-in-mongo-ops-manager-when-smtp-not-setup

@synetalsolutions
Copy link

I have smtp configured and I also try this db.config.users.update({"un": ""}, {$set: {"isLocked": false, lastPageView: new Date()}}).

But no luck..

@imravichaudhary
Copy link
Author

@synetalsolutions Did you execute the command on mmsdbconfig DB? Also, check the configuration setting for users using db.config.users.find({}).

@imravichaudhary
Copy link
Author

@synetalsolutions I think you should be able to unlock the account using

db.config.users.update({"un": "xxx@myemail.com"}, {$set: {"isLocked": false, lastPageView: new Date()}})

Note: Update the un value as per the document.

@synetalsolutions
Copy link

db.config.users.update({"un": "xxx@myemail.com"}, {$set: {"isLocked": false, lastPageView: new Date()}})

ok that work thanks @imravichaudhary

@KevinChris7
Copy link

Opsmanager account gets locked often ,so is there any way to avoid it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment