mongo_usrs_roles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mongo_usrs_roles [2019/09/10 18:58] andonovjmongo_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 "auth" parameter
 +  * Higher than 3.X: Add the following paramer:
 +
 +<sxh bash>
 +security:
 +  authorization: "enabled"
 +</sxh>
  
 =====User Management===== =====User Management=====
Line 168: Line 180:
 > db.updateUser("adminDBA", {pwd: "password123" }) > db.updateUser("adminDBA", {pwd: "password123" })
 > >
-</sxh> 
- 
-=====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 "auth" parameter 
-  * Higher than 3.X: Add the following paramer: 
- 
-<sxh bash> 
-security: 
-  authorization: "enabled" 
 </sxh> </sxh>
  
  • mongo_usrs_roles.1568141884.txt.gz
  • Last modified: 2019/10/18 20:04
  • (external edit)