I am transferring MongoDB databases from one server to another. The servers cannot talk to each other, so I must use mongodump/mongorestore. The 'from' server used authentication for the databases. The 'to' server is in a secure environment, so I'd like to completely obliterate any security/authentication features from the database. Is it as simple as just deleting the *users
Mongodb – Transfering data from one MongoDB server to another while eliminating users/authentication
mongodb
Related Question
- MongoDB – Sharded Cluster Backup User Issue
- MongoDB Config Server – How to Isolate One Config Server
- MongoDB – Config Server with WiredTiger Does Not Authenticate Existing User
- MongoDB Replication – Fixing dbclient_rs replSetGetStatus Unauthorized Error
- Mongodb – Could not add Replica Set to MongoDB Shard
- MongoDB Sharded Cluster – Evaluating 4 Shards with 575 GB Data
- Mongodb – Flask mongodb assertion 13 not authorized for query on flask_session.sessions
Best Answer
Yes, just
db.system.users.remove({});
for each database.It seems a bit harder to drop the
system.users
collection, see: https://jira.mongodb.org/browse/SERVER-4302 but it shouldn't hurt anything if it's empty.The authentication part is enabled when you run
mongod
with-auth
, so don't put that in your startup script or config file (comment outauth=true
, or putauth=false
if you're running 2.0+).