如何修复 mosquitto_passwd 覆盖密码文件中所有其他用户
问题:
像这样运行 mosquitto_passwd 时:
example-4.sh
或使用 -c 参数:
example-3.sh
用户被创建但文件中之前列出的所有其他用户都被删除了。
解决方案
使用 -c 标志创建第一个用户,以便在文件不存在时创建文件
example-2.sh
然后使用 -b(批处理模式)创建其他用户,它允许你在命令行上指定密码:
example-1.sh
使用 -b 时,旧用户不会被删除。
Check out similar posts by category:
MQTT
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow