To enable a secured authentication on the MongoDB database, perform the following steps:
- Edit the following file:
- Add the following lines:
Note: Ensure the line is not commented (remove '#') and the indentation is correct.
- Restart MongoDB by running the following command:
As root user
systemctl restart mongod
Once MongoDB is configured, it is necessary to modify accordingly the following files: