Professional Documents
Culture Documents
Can't Connect To MongoDB With Authentication Enabled - Stack Overflow PDF
Can't Connect To MongoDB With Authentication Enabled - Stack Overflow PDF
Home
PUBLIC
Stack Overflow
Tags
Can't connect to MongoDB with authentication enabled Ask Question
Users
Jobs I'm running the latest MongoDB for Ubuntu 14.04 asked 3 years, 4 months ago
I have created a user named "admin" with "userAdminAnyDatabase" role viewed 14,607 times
4
Teams I can access databases locally and externally active 1 year, 6 months ago
Q&A for work
I can login with "admin' with SHA-SCRAM-1
Learn More
When I edit to config file to restrict access only with authentication things go wrong. What happens:
1
1. I uncomment "#auth = true" in the config file.
2. I cannot access with the correct credentials of the "admin" account.
Bear in mind that I do use "service mongod restart" after making changes.
#processManagement:
Work remotely - from home or wherever you
choose.
#security:
#auth = true
#operationProfiling: Browse remote jobs
#replication:
## Enterprise-Only Options:
Linked
#auditLog:
#snmp:
6 MongoDB permissions: restrict access to
two databases
Snapshot of database for reference:
1 Cannot connect with authentication to
mongodb?
Related
Are you sure that manager supports SHA-SCRAM-1? – Danny Varod Oct 24 '15 at 20:13 Why is "rm -r" unable to delete this folder?
@DannyVarod It's an option in a ListView when creating a new connection so it should :) – ManyQuestions Why do neural networks need so many examples
Oct 24 '15 at 21:40 to perform?
what command you are using for that may i know ? I have done the same thing in ubuntu 15.x version – How do dictionaries source attestation?
Alok Deshwal Oct 25 '15 at 3:19
Is there a way to pause a running process on
Linux systems and resume later?
show 1 more comment
Limit at infinity for complex functions
There's a field in which you can give in the auth database – ManyQuestions Oct 25 '15 at 16:20
I just noticed this coming up though: 2015-10-25 T12:23:12.256-0400 I ACCESS [conn1] SCRAM-SHA-1
authentication failed for admin on admin from client xx.XX.xx.xx ; UserNotFound Could not find user
admin@admin – ManyQuestions Oct 25 '15 at 16:26
@ManyQuestions Maybe you created the user the old 2.X way? Try dropping and recreating the user with
db.createUser because you can get that error if you created it with db.addUser. – heenenee Oct 25 '15 at 16:58
Finding answers within your organization can be as easy as finding this one... Learn more
1. Did you follow the instructions in Enable Client Access Control to create the user and enable
authentication?
2 2. What is the output of your log, when you try to access mongoDB with credentials?
3. Did you tell mongoDB somewhere to use the config file? Try to start mongoDB locally on the PC
mongoDB is running with mongod --config ../etc/mongod.conf and then try to connect from
your Windows PC like you did before.
add a comment
Your Answer
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie
policy, and that your continued use of the website is subject to these policies.
Not the answer you're looking for? Browse other questions tagged mongodb authentication database
STACK OVERFLOW PRODUCTS COMPANY STACK EXCHANGE Blog Facebook Twitter LinkedIn
NETWORK
Questions Teams About
Technology
Jobs Talent Press
Life / Arts
Developer Jobs Directory Engagement Work Here
Culture / Recreation
Salary Calculator Enterprise Legal
Science
Help Privacy Policy
Other
Mobile Contact Us site design / logo © 2019 Stack Exchange Inc; user contributions
licensed under cc by-sa 3.0 with attribution required.
Disable Responsiveness rev 2019.2.22.32933