How do I add authentication to my mongod.conf file so that I don't have to specify run mongod --auth
every time I launch the mongod
daemon?
Asked
Active
Viewed 402 times
0
-
But the [accepted answer](http://stackoverflow.com/a/34863984/1296707) will definetly suit your needs. – Markus W Mahlberg Feb 07 '16 at 09:05
1 Answers
0
Edit /etc/mongod.conf
Either add or look for the security:
section
and add authorization: enabled
below it, like so:
security:
authorization: enabled
save and restart the daemon without the --auth

hex20dec
- 117
- 2
- 9