add user&password

78 views
Skip to first unread message

Alexander Muller

unread,
Jan 8, 2016, 5:39:00 AM1/8/16
to MQTT
Hi,

I'm using Mosquitto 1.4.5 (and Node-RED) on a RPi and wanted to create a user+password every client in Node-RED has to use to get information from the broker.

I added the "allow_anonymous false" line in my mosquitto.conf and created the passwd file by using "sudo mosquitto_passwd -c /etc/mosquitto/passwd usernameHere (then entered a valid password).

The user and password are still not required to get information. What am I missing?


Thanks in advance! 

Roger Light

unread,
Jan 11, 2016, 4:39:42 PM1/11/16
to mq...@googlegroups.com
Hi Alexander,

This would have been better asked on the mosquitto mailing list.

My guess would be that either you've not configured the password file
in the mosquitto config, and/or you've not restarted the broker
afterwards.

Cheers,

Roger
> --
> To learn more about MQTT please visit http://mqtt.org
> ---
> You received this message because you are subscribed to the Google Groups
> "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mqtt+uns...@googlegroups.com.
> To post to this group, send email to mq...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mqtt.
> For more options, visit https://groups.google.com/d/optout.

student...@gmail.com

unread,
Jan 12, 2016, 5:58:30 AM1/12/16
to MQTT, ro...@atchoo.org
Thanks for your responds!

I did restart mosquitto afterwards.
What doesnt work is adding the path of the password file to my mosquitto.conf.

When I added the line

password_file file-path-here

to the mosquitto.conf my broker doesnt work anymore ("failed to connect broker...").

Phuc Tran

unread,
Feb 15, 2016, 1:18:26 AM2/15/16
to MQTT, ro...@atchoo.org
when you use password_file file-path-here, you need to run at secure mode(port 8883)
Reply all
Reply to author
Forward
0 new messages