NOTE: If you are running Clean My Org on the same server, this workflow may cause issues with the application unless you also /wiki/spaces/GJKBASE/pages/648413204
- In Command Prompt, navigate to the MongoDB installation directory with mongo.exe, the default is
cd /D “C:\Program Files\MongoDB\Server\4.0“ - Type mongo from this directory in the command prompt to start the mongo shell. (Note: if you are already using authentication with mongo, you will need to log in with administrator credentials.)
- Type:
use geojobe_admintools - Copy and paste in the following lines:
db.createUser({"user": "admintoolsdb", "pwd":"yourpassword", roles: [{ role: "dbAdmin", db: "geojobe_admintools" }]})
db.grantRolesToUser("admintoolsdb", [ { role: "readWrite", db: "geojobe_admintools" } ]) - Type exit to leave the mongo shell.
- To enable mongoDB with authentication, edit the file in the default mongo installation directory C:\Program Files\MongoDB\Server\4.0\mongod.cfg
- Find the line starting with #security and paste the following lines underneath it:
security:
authorization: enabled - Save the file and close.
- In the Admin Tools directory, edit the file called: C:\inetpub\wwwroot\admintools\app-server\app-server\config.json
- Edit the “dbPath” line to read:
"dbPath": "mongodb://admintoolsdb:yourpassword@localhost:27017/geojobe_admintools", - Edit the "dbPass" line to read:
"dbPass": "yourpassword" - Save the file and close.
- Open Windows Services and restart the “MongoDB Server” windows service.
- Restart the “Admin Tools Server” windows service.
Related articles