I have a mongo v2.6.12 cluster that I can't connect to from a new windows machine. Using TNC I've confirmed that port 27017 is accessible from the source -> destination.

How can I tell if there are mongo-level restrictions, similar to how mysql would grant privileges to a user from a specific host?

I tried using this: db.getUser('portfolio_dev', {showCredentials: true, showPrivileges: true, showAuthenticationRestrictions: true}); but I get an error:

Error: "showAuthenticationRestrictions" is not a valid argument to usersInfo at src/mongo/shell/db.js:1342

I have tried to see if there is a way in this old version of mongo but can't seem to find anything.

Edit: I have another, more general, question for this same issue: Mongo cluster connection from .Net 4.8 application timing out with No such host is known error. However, in order to rule out a mongodb level restriction I'm trying to check access, hence this question.

  • MongoDB 2.6 became end-of-life in 2016! It's time for an upgrade, I would say. Commented Oct 7, 2023 at 9:55
  • That is on the road map Commented Oct 7, 2023 at 14:36

1 Answer 1


Try to select the collection directly:

db.getSiblingDB('admin').getCollection('system.users').find({user: 'portfolio_dev'})
  • This didn't return any AuthenticationRestrictions; however, I'm not sure that is even a thing in Mongo 2.6. I was able to track down my issue which was related to cluster configuration (not using FQDN). Commented Oct 9, 2023 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.