/halp/ - LynxChan technical assistance

General support


Reply:



Max Message Length: 4096
Make sure I have a block bypass
Files:
Spoiler Max File Size: 1.00 MB
File Limit Per Post: 3
Remember to follow the rules .


mongodb security Anonymous 02/20/2017 (Mon) 13:08:06 No. 331
I've got Lynx set up and it's working wonderfully. But I would like to secure mongo a little bit more than just limiting it to the local host.

I opened mongo, switched to the admin db

>use admin
>db.createUser({user: "admin", pwd: "password", roles:[{role: "userAdminAnyDatabase", db: "admin"}]})

switched on security:
>security:
>authorization: enabled

Log back in and make a lynxuser user
>use user-data
>db.createUser({user: "lynxuser", pwd: "password", roles:[{role: "read", db: "user-data"}, {role:"readWrite", db: "lynxchan"}]})

Then I add
> user: "lynxuser",
> password: "password"

To the db.json settings.

It works fine if it's got no authorization, but even if I put the admin username and password in the db.json file it just throws an error. I didn't turn on the ssl flag or anything. But I'm mostly posting here to make sure it isn't a system username and password or something like that.

Anonymous 02/20/2017 (Mon) 21:27:03 No. 332
If you typed LITERALLY that, then your json is invalid, keys also need double commas.

What error are you getting?


Reason:
Password:
Global
Delete only files
Delete media (Actually removes the saved files from the server, standard file deletion only removes the reference to the selected posts)

Captcha(Used for reporting and bans by board staff): No cookies?