By default there is only 1 user created during the installation process of BVQ. You can modify the user & password in the repository installer within the DB access screen.
This user afterwards is used by the BVQ services & UIs to connect to the database. Whenever you change the password of the user remeber to change it in the other BVQ modules (GUI DB connection profile, etc.)
Change the password of an existing user
- Establish a connection to MongoDB via mongo CLI (use CMD or PowerShell)
mongo --authenticationDatabase admin -u bvq -p P@ssw0rd
(default location of binaries = C:\Program Files\SVA\BVQ\bvq-mongodb\bin, put in PATH variable to access from outside the directory
change username -u and password -p to your credentials)
The user information is configured globally for the entire MongoDB in the
admin
DB, so you have to switch to this DB.
List existing dbs withshow dbs
commandPS C:\Users\fschenke> mongo --authenticationDatabase admin -u bvq -p P@ssw0rd MongoDB shell version v3.4.4 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.4 > show dbs admin 0.000GB bvq 0.401GB local 0.000GB
Mit dem Befehl
use admin
zur admin DB wechseln:> use admin switched to db admin
Über das Kommando
db.changeUserPassword()
kann das Passwort des Users geändert werdendb.changeUserPassword("bvq", "NEW_PASSWORD")
In diesem Beispiel wird das Passwort des Users
bvq
aufNEW_PASSWORD
geändert.Nach Ausführung des Befehls wird das PW geändert. Eine Anmeldung ist dann nur mit neuem Passwort möglich.
PS C:\Users\fschenke> mongo --authenticationDatabase admin -u bvq -p P@ssw0rd MongoDB shell version v3.4.4 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.4 2017-12-05T18:50:07.771+0100 E QUERY [thread1] Error: Authentication failed. : DB.prototype._authOrThrow@src/mongo/shell/db.js:1459:20 @(auth):6:1 @(auth):1:2 exception: login failed PS C:\Users\fschenke> mongo --authenticationDatabase admin -u bvq -p NEW_PASSWORD MongoDB shell version v3.4.4 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.4 > exit bye PS C:\Users\fschenke>
By default there is only 1 user created during the installation process of BVQ. You can modify the user & password in the repository installer within the DB access screen.
This user afterwards is used by the BVQ services & UIs to connect to the database. Whenever you change the password of the user remeber to change it in the other BVQ modules (GUI DB connection profile, etc.)
Change the password of an existing user
- Establish a connection to MongoDB via mongo CLI (use CMD or PowerShell)
mongo --authenticationDatabase admin -u bvq -p P@ssw0rd
(default location of binaries = C:\Program Files\SVA\BVQ\bvq-mongodb\bin, put in PATH
variable to access from outside the directory
change username -u and password -p to your credentials)
The user information is configured globally for the entire MongoDB in the
admin
DB, so you have to switch to this DB.
List existing dbs withshow dbs
commandPS C:\Users\fschenke> mongo --authenticationDatabase admin -u bvq -p P@ssw0rd MongoDB shell version v3.4.4 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.4 > show dbs admin 0.000GB bvq 0.401GB local 0.000GB
Mit dem Befehl
use admin
zur admin DB wechseln:> use admin switched to db admin
Über das Kommando
db.changeUserPassword()
kann das Passwort des Users geändert werdendb.changeUserPassword("bvq", "NEW_PASSWORD")
In diesem Beispiel wird das Passwort des Users
bvq
aufNEW_PASSWORD
geändert.Nach Ausführung des Befehls wird das PW geändert. Eine Anmeldung ist dann nur mit neuem Passwort möglich.
PS C:\Users\fschenke> mongo --authenticationDatabase admin -u bvq -p P@ssw0rd MongoDB shell version v3.4.4 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.4 2017-12-05T18:50:07.771+0100 E QUERY [thread1] Error: Authentication failed. : DB.prototype._authOrThrow@src/mongo/shell/db.js:1459:20 @(auth):6:1 @(auth):1:2 exception: login failed PS C:\Users\fschenke> mongo --authenticationDatabase admin -u bvq -p NEW_PASSWORD MongoDB shell version v3.4.4 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.4 > exit bye PS C:\Users\fschenke>