Skip to content

Commit

Permalink
🔐 refact(auth): Set no auth by default and update readme (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatelot authored Mar 2, 2023
1 parent bba0606 commit a679220
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,20 @@ By default we activated the log and data persistance (logs are in the `log` fold

### Enable authentication

In the config file, just uncomment the `Authentication` part and then restart the container.
The default user is `admin/password`.
In the config file, set the value `allow_anonymous` to `false`, then uncomment the last line (`password_file`) and finaly restart the container.

**You always have to restart if you want the modification to be taken in account:**

```bash
docker-compose restart
```
> The default user is `admin/password`.
### Change user password / create a new user

```bash
docker-compose exec mosquitto mosquitto_passwd -b /mosquitto/config/password.txt user password
docker-compose restart
```

### Delete user

```bash
docker-compose exec mosquitto mosquitto_passwd -D /mosquitto/config/password.txt user
docker-compose restart
```
2 changes: 1 addition & 1 deletion config/mosquitto.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ log_dest file /mosquitto/log/mosquitto.log

## Authentication ##
# By default, Mosquitto >=2.0 allows only authenticated connections. Change to true to enable anonymous connections.
allow_anonymous false
allow_anonymous true
# password_file /mosquitto/config/password.txt

0 comments on commit a679220

Please sign in to comment.