mosquitto_passwd to create multiple users

Asked by Chuan J

Hi,

I am using the mosquitto_paswwd to create password file, the command like this:
mosquitto_passwd -c passwordfile username

I wonder if it is possible to create more users in the same password file, since the command above will overwrite the existing user each time. My broker has TLS support, so the plain text in the format "username:password" will not applicable for me.

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Light
Solved:
Last query:
Last reply:
Revision history for this message
Best Roger Light (roger.light) said :
#1

The "-c" option creates a new password file. If the file already exists, it will be overwritten. If you want to add further users to the password file, remove the "-c" option when the file already exists.

Cheers,

Roger

Revision history for this message
Chuan J (chuan-jin-813) said :
#2

Thanks Roger Light, that solved my question.

Revision history for this message
bearcount (xgp1127) said :
#3

The file don't add further user when I remove the "-c" option when the file already exists. There is only a user in the file.What is the reason? what should it config in the config file ? In addition, I run it as a window server.