Browse Source

Bugfix in mass_deploy mongodb privileges grant

Yann Weber 8 years ago
parent
commit
174adce1c8
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      progs/mass_deploy.sh

+ 1
- 1
progs/mass_deploy.sh View File

@@ -134,7 +134,7 @@ do
134 134
 	dbpass=$($rnd_pass_cmd)
135 135
 	mongo $MONGODB_HOST -u "$MONGODB_ADMIN_USER" -p "$MONGODB_ADMIN_PASSWORD" admin <<EOF
136 136
 use $dbname
137
-db.addUser('$dbuser', '$dbpass', ['readWrite', '$dbname'])
137
+db.addUser({user:"$dbuser", pwd:"$dbpass", roles:["readWrite", "dbAdmin"]})
138 138
 exit
139 139
 EOF
140 140
 	#Append created db to instance conf

Loading…
Cancel
Save