mosquitto_passwd1Mosquitto ProjectCommandsmosquitto_passwdmanage password files for mosquittomosquitto_passwdhashpasswordfileusernamemosquitto_passwdhashpasswordfileusernamepasswordmosquitto_passwdpasswordfileDescriptionmosquitto_passwd is a tool for managing
password files for the mosquitto MQTT broker.Usernames must not contain ":". Passwords are stored in a similar
format to
crypt3.OptionsRun in batch mode. This allows the password to be
provided at the command line which can be convenient
but should be used with care because the password will
be visible on the command line and in command
history.Create a new password file. If the file already
exists, it will be overwritten.Delete the specified user from the password
file.Choose the hash to use. Can be one of
sha512-pbkdf2 or
sha512. Defaults to
sha512-pbkdf2. The
sha512 option is provided for
creating password files for use with Mosquitto 1.6
and earlier.This option can be used to upgrade/convert a password
file with plain text passwords into one using hashed
passwords. It will modify the specified file. It does
not detect whether passwords are already hashed, so
using it on a password file that already contains
hashed passwords will generate new hashes based on the
old hashes and render the password file
unusable.The password file to modify.The username to add/update/delete.The password to use when in batch mode.Exit Status
mosquitto_sub returns zero on success, or non-zero on error. If
the connection is refused by the broker at the MQTT level, then
the exit code is the CONNACK reason code. If another error
occurs, the exit code is a libmosquitto return value.
MQTT v3.1.1 CONNACK codes: Success Connection refused: Bad protocol version Connection refused: Identifier rejected Connection refused: Server unavailable Connection refused: Bad username/password Connection refused: Not authorizedMQTT v5 CONNACK codes: Success Unspecified error Malformed packet Protocol error Implementation specific error Unsupported protocol version Client ID not valid Bad username or password Not authorized Server unavailable Server busy Banned Server shutting down Bad authentication method Keep alive timeout Session taken over Topic filter invalid Topic name invalid Receive maximum exceeded Topic alias invalid Packet too large Message rate too high Quota exceeded Administrative action Payload format invalid Retain not supported QoS not supported Use another server Server moved Shared subscriptions not supported Connection rate exceeded Maximum connect time Subscription IDs not supported Wildcard subscriptions not supportedExamplesAdd a user to a new password file:mosquitto_passwd -c /etc/mosquitto/passwd ralDelete a user from a password filemosquitto_passwd -D /etc/mosquitto/passwd ralBugsmosquitto bug information can be found at
See Alsomosquitto8mosquitto.conf5mqtt7AuthorRoger Light roger@atchoo.org