#3720·mosquitto

mosquitto_passwd can no longer be used to create users file for older mosquitto versions

Author: patagonaaCreated Aug 21, 2026Updated Aug 21, 2026
LabelsStatus: Available

My usual workflow with mosquitto involves creating the password file on my laptop using mosquitto_passwd and then uploading the file to my server (where mosquitto is running).

However, this seems to no longer work because the default salt length has been changed and older versions of mosquitto expect a fixed salt length of 12.

The mosquitto version on my laptop is 2.1.2, my server still has 2.0.21.

This wouldn't be much of an issue if it was possible to set the salt length via the mosquitto_passwd command line (or if there was a flag like --legacy-salt which always sets it to 12), but I couldn't find a flag to change this (only the hash function can be changed).

I think it should be possible to create hashes with any version of mosquitto_passwd that works with older mosquitto versions by setting CLI flags

Source: eclipse-mosquitto/mosquitto