Skip to content

Mosquitto local logins not working #4235

@hansinator

Description

@hansinator

Describe the issue you are experiencing

Hi,
I added a user "quingping" with password "test" to my local mosquitto users and it can not log in. I tried multiple methods.
Yes, I am absolutely sure I wrote the user and password correctly.

When I add the user using the home assistant user management, then it works. Something must be broken with the local config auth.

[06:09:40] INFO: Setting up user quingping
[06:09:41] INFO: Using pre-hashed password for quingping
...
2025-11-19 06:10:33: New connection from 192.168.1.210:49314 on port 1883.
time="2025-11-19T06:10:33+01:00" level=debug msg="checking auth cache for quingping"
time="2025-11-19T06:10:33+01:00" level=debug msg="to auth record: [97 117 116 104 45 113 117 105 110 103 112 105 110 103 45 116 101 115 116 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2025-11-19T06:10:33+01:00" level=debug msg="checking user quingping with backend Files"
time="2025-11-19T06:10:33+01:00" level=warning msg="wrong password for user quingping"
time="2025-11-19T06:10:33+01:00" level=debug msg="checking user quingping with backend HTTP"
time="2025-11-19T06:10:34+01:00" level=info msg="error code: 401"
time="2025-11-19T06:10:34+01:00" level=debug msg="setting auth cache for quingping"
2025-11-19 06:10:33: Sending CONNACK to mqtt-explorer-7065a13f (0, 5)
time="2025-11-19T06:10:34+01:00" level=debug msg="to auth record: [97 117 116 104 45 113 117 105 110 103 112 105 110 103 45 116 101 115 116 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
2025-11-19 06:10:33: Client mqtt-explorer-7065a13f disconnected, not authorised.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Mosquitto broker

What is the version of the add-on?

6.5.2

Steps to reproduce the issue

Add config

logins:
  - username: quingping
    password: >-  $7$101$Bxd2ljAMgVf8WjCF$z8D0RSLpVHKxh4N18ZOXWtN+ewUUWcJFQhI/KieeZT+2E85qBb0IDFzUlcLVria6W1ak9dk4ucL+7GEGLdpXwQ==

Login using a device, or mqtt-explorer.
3.
Watch the logs to see the user is not authorized

System Health information

System Information

version core-2025.11.2
installation_type Home Assistant OS
dev false
hassio true
docker true
container_arch aarch64
user root
virtualenv false
python_version 3.13.9
os_name Linux
os_version 6.12.47-haos-raspi
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 2422
Downloaded Repositories 5
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 16.3
update_channel stable
supervisor_version supervisor-2025.11.3
agent_version 1.7.2
docker_version 28.3.3
disk_total 458.4 GB
disk_used 12.7 GB
nameservers 192.168.1.1, 2001:fb0:100::207:29, 2001:fb0:100::207:49
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board rpi5-64
supervisor_api ok
version_api ok
installed_addons Matter Server (8.1.1), Studio Code Server (6.0.0), ESPHome Device Builder (2025.9.1), OpenThread Border Router (2.15.1), Advanced SSH & Web Terminal (22.0.1), Mosquitto broker (6.5.2)
Dashboards
dashboards 5
resources 1
views 2
mode storage
Network Configuration
adapters lo (disabled), end0 (enabled, default, auto), docker0 (disabled), hassio (disabled), veth70ceebd (disabled), veth0f0be11 (disabled), vethd3f069e (disabled), veth0b48846 (disabled), veth331ce5f (disabled), veth566898e (disabled), vethe33c83e (disabled), veth99aaec3 (disabled), wpan0 (disabled)
ipv4_addresses lo (127.0.0.1/8), end0 (192.168.1.200/24), docker0 (172.30.232.1/23), hassio (172.30.32.1/23), veth70ceebd (), veth0f0be11 (), vethd3f069e (), veth0b48846 (), veth331ce5f (), veth566898e (), vethe33c83e (), veth99aaec3 (), wpan0 ()
ipv6_addresses lo (::1/128), end0 (2001:fb1:fb:a027:8b43:6802:3db4:bbd7/64, fe80::161d:2c2c:bf0a:aea2/64), docker0 (fe80::340c:6fff:fe3f:22e/64), hassio (fe80::bc42:17ff:fe0e:35ee/64), veth70ceebd (fe80::2038:a2ff:fee4:47af/64), veth0f0be11 (fe80::583f:f6ff:fe88:8241/64), vethd3f069e (fe80::3c0b:afff:fe06:e2f7/64), veth0b48846 (fe80::8d1:1eff:fe6f:8398/64), veth331ce5f (fe80::c4e3:a1ff:fe9c:b48c/64), veth566898e (fe80::e0be:cfff:fe33:b79f/64), vethe33c83e (fe80::78a6:99ff:fece:809f/64), veth99aaec3 (fe80::8cd7:c3ff:fe32:d543/64), wpan0 (fd4c:2897:7002:a67:0:ff:fe00:fc11/64, fdd4:4b27:1522:1:505c:ca55:312d:cbab/64, fd4c:2897:7002:a67:0:ff:fe00:fc10/64, fd4c:2897:7002:a67:0:ff:fe00:fc38/64, fd4c:2897:7002:a67:0:ff:fe00:fc00/64, fd4c:2897:7002:a67:0:ff:fe00:5c00/64, fd4c:2897:7002:a67:c82f:c77a:1f10:3c8b/64, fe80::9caf:4a1b:545e:bf80/64)
announce_addresses 192.168.1.200, 2001:fb1:fb:a027:8b43:6802:3db4:bbd7, fe80::161d:2c2c:bf0a:aea2
Recorder
oldest_recorder_run November 13, 2025 at 1:45 PM
current_recorder_run November 19, 2025 at 10:17 AM
estimated_db_size 0.55 MiB
database_engine sqlite
database_version 3.49.2
Spotify
api_endpoint_reachable ok

Anything in the Supervisor logs that might be useful for us?

Anything in the add-on logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions