0

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?

Community
  • 1
  • 1
hex20dec
  • 117
  • 2
  • 9

1 Answers1

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