Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
mongo_usrs_roles [2019/09/10 18:58] – andonovj | mongo_usrs_roles [2019/10/18 20:04] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Overview====== | ======Overview====== | ||
Users and roles in Mongo are per databases. Meaning if you want to create a user in a certain database, you have to use that database as follows: | Users and roles in Mongo are per databases. Meaning if you want to create a user in a certain database, you have to use that database as follows: | ||
+ | |||
+ | |||
+ | =====Enable Authentication===== | ||
+ | Authentication is disabled by default, but you can enable it in the configuration file. Again depending on the version: | ||
+ | |||
+ | * Less then 3.X: Add the " | ||
+ | * Higher than 3.X: Add the following paramer: | ||
+ | |||
+ | <sxh bash> | ||
+ | security: | ||
+ | authorization: | ||
+ | </ | ||
=====User Management===== | =====User Management===== | ||
Line 168: | Line 180: | ||
> db.updateUser(" | > db.updateUser(" | ||
> | > | ||
- | </ | ||
- | |||
- | =====Authentication===== | ||
- | Authentication is disabled by default, but you can enable it in the configuration file. Again depending on the version: | ||
- | |||
- | * Less then 3.X: Add the " | ||
- | * Higher than 3.X: Add the following paramer: | ||
- | |||
- | <sxh bash> | ||
- | security: | ||
- | authorization: | ||
</ | </ | ||