From 9fc39075885444ea690957e79d0fb2a74af36b8b Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Sun, 2 May 2021 23:56:24 +0200 Subject: [PATCH] mise aux conventions --- HowtoMongoDB.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/HowtoMongoDB.md b/HowtoMongoDB.md index f925b00f..616de0c9 100644 --- a/HowtoMongoDB.md +++ b/HowtoMongoDB.md @@ -150,7 +150,7 @@ $ mongo > db.createUser( { user: "mongoAdmin", - pwd: "PASS", + pwd: "PASSWORD", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] } ) @@ -176,7 +176,7 @@ Si aucun utilisateur n'est crée, l'authentification reste inactive. On peut ensuite se connecter à la base "admin" ainsi : ~~~ -$ mongo admin -u mongoAdmin -p PASS +$ mongo admin -u mongoAdmin -p PASSWORD ~~~ > *Note*: Si on spécifie simplement l'argument `-p`, sans valeur, mongo demandera de saisir le mot de passe. Ainsi, il ne sera pas dans votre historique shell ! @@ -190,7 +190,7 @@ Pour les accès aux base, les utilisateurs sont stockés dans la collection _sys Comme pour MySQL, on peut manipuler mongo en CLI en mode interactif avec la commande `mongo` ``` -$ mongo admin -u mongoAdmin -p PASS +$ mongo admin -u mongoAdmin -p PASSWORD ``` Ici, pour se connecter à la base locale admin. Comme la base d'authentification n'est pas spécifiée, ça sera la base à laquelle on se connecte (ici admin) qui servira pour l'authentificat @@ -205,7 +205,7 @@ Ici, pour se connecter à la base locale admin. Comme la base d'authentification > db.createUser( { "user" : "myApp", - "pwd" : "PASS", + "pwd" : "PASSWORD", roles: [ { "role" : "dbOwner", "db" : "myApp" } ] @@ -367,7 +367,7 @@ Voir db.createUser( { user: "mongoAdmin", - pwd: "PASS", + pwd: "PASSWORD", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, - { "role" : "clusterAdmin", "db" : "admin" } ] + { "role" : "clusterAdmin", "db" : "admin" } ] } ) @@ -457,7 +457,7 @@ security: Sur le noeud primaire, on va amorcer le cluster : ~~~ -# mongo -u mongoAdmin -p PASS +# mongo -u mongoAdmin -p PASSWORD > rs.initiate() ~~~ @@ -701,7 +701,7 @@ Si l'authentification est activée, il faut alors créer un compte. On peut util > db.createUser( { user: "mmongoMonitoring", - pwd: "PASS", + pwd: "PASSWORD", roles: [ "clusterMonitor" ] } ) @@ -724,7 +724,7 @@ Si l'authentification est activée, il faut alors créer un compte. On peut util ~~~ [mongo_*] -env.MONGO_DB_URI mongodb://mongoMonitoring:PASS@localhost:27017/admin +env.MONGO_DB_URI mongodb://mongoMonitoring:PASSWORD@localhost:27017/admin ~~~ ### NRPE : check_mongo