简体   繁体   中英

How to disable anonymous access to MongoDB 3.0.x in linux

we are using centos 7 , mongodb 3.0.8 Im trying to disable anonymous access to mongodb. Place auth = true in /etc/mongod.conf disabling anonymous access in version 2.x but in version 3 when i place the same , the server it self not starting

When i hard search , i found in the mongo docs that in version 3.x security.authorization should be placed in /etc/mongod.conf

Could any one please help me how to place security.authorization in config file.

add the following to the mongod.conf file:

security:
  authorization: enabled

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM