LAB: Logging to a Different Facility

This is my config.cfg.

storage:
dbPath: /var/mongodb/db
net:
bindIp: “127.0.0.1,192.168.103.100”
port: 27000
security:
authorization: enabled
systemLog:
destination: file
path: /var/mongodb/db/mongod.log
logAppend: true
operationProfiling:
mode: “slowOp”
slowOpThresholdMs: 50

I hope it’s ok but when I run:
mongod --config /shared/config.cfg

image

If I run:

mongod --dbpath /data/db --port 27000 --bind_ip “127.0.0.1,192.168.103.100” --auth

It works fine…

I’ve restarted vagrant and then all computer, but… it’s not working…

On the other hand:
If I open another powershell windows, open vagrant ssh, and then run:
mongo admin --host localhost:27000

I get this error:

image

So it seems there is no user authenticated, but … I cannot create it… I don’t understand…

Many thanks for your valueable help !!

Xavi

May be user already created.You need to authenticate the user
Please check this link

SyntaxError when I create User