Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mongo_config_auth [2019/10/18 11:04] – external edit 127.0.0.1 | mongo_config_auth [2019/10/30 17:29] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 80: | Line 80: | ||
This command will create you a user called adminDBA in database: admin (important) and grant him all rights. | This command will create you a user called adminDBA in database: admin (important) and grant him all rights. | ||
=====Enable Authentication===== | =====Enable Authentication===== | ||
- | To enable authentication | + | Authentication in Mongo is disabled by default. Meaning everyone can connect to the database who has access to the server. |
+ | Furthermore to enable authentication | ||
+ | To enable authentication <= 2.6: you should start the Mongo in special way, as follows: | ||
+ | ====For Version 2.6 or less==== | ||
<sxh bash> | <sxh bash> | ||
===Stop=== | ===Stop=== | ||
Line 98: | Line 101: | ||
forked process: 3931 | forked process: 3931 | ||
child process started successfully, | child process started successfully, | ||
+ | </ | ||
+ | |||
+ | Or you can enable it in the configuration file: | ||
+ | |||
+ | <sxh bash> | ||
+ | auth = true | ||
+ | </ | ||
+ | |||
+ | ====For versions 2.8 or higher==== | ||
+ | To enable authentcation > 2.6 | ||
+ | You can edit the / | ||
+ | |||
+ | <sxh bash> | ||
+ | security: | ||
+ | authorization: | ||
</ | </ | ||