Update mongodb debian

rainbow napkin 2024-12-07 20:04:56 +00:00
parent 5aedb04713
commit afc5ca6e33

@ -16,7 +16,7 @@
```
db.createUser(
{
user: "myUserAdmin",
user: "admin",
pwd: passwordPrompt(),
roles: [
{ role: "userAdminAnyDatabase", db: "admin" },
@ -24,4 +24,12 @@ db.createUser(
]
}
)
```
```
4. Add the following to `/etc/mongod.conf` to enable authentication:
```
security:
authorization: enabled
```
5. Restart `mongod` with `sudo systemctl restart mongod`
6.