LinuxCommandLibrary

mosquitto_passwd

manages password files for the Mosquitto MQTT broker

TLDR

Create password file with user

$ mosquitto_passwd -c [passwordfile] [username]
copy
Add user to existing file
$ mosquitto_passwd [passwordfile] [username]
copy
Delete user
$ mosquitto_passwd -D [passwordfile] [username]
copy
Batch mode with password
$ mosquitto_passwd -b [passwordfile] [username] [password]
copy

SYNOPSIS

mosquitto_passwd [options] passwordfile [username]

DESCRIPTION

mosquitto_passwd manages password files for the Mosquitto MQTT broker. Creates and modifies password entries with secure hashing. Used for client authentication in MQTT messaging systems.

PARAMETERS

-c

Create new password file.
-D
Delete user from file.
-b
Batch mode, password on command line.
-U
Upgrade plain text file to hashed.

CAVEATS

Avoid -b flag in scripts as passwords may appear in process listings. Use interactive mode or pipe from secure sources.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community