I'm running the latest MongoDB for Ubuntu 14.04
- I have created a user named "admin" with "userAdminAnyDatabase" role
- I can access databases locally and externally
- I can login with "admin' with SHA-SCRAM-1
When I edit to config file to restrict access only with authentication things go wrong. What happens:
- I uncomment "#auth = true" in the config file.
- I cannot access with the correct credentials of the "admin" account.
Bear in mind that I do use "service mongod restart" after making changes.
Config file for reference:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
#processManagement:
#security:
#auth = true
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
Snapshot of database for reference:
What's going wrong?