Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
add comment

1 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 out auth=true, or put auth=false if you're running 2.0+).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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