Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » Unable to activate User/Password(Unable to disable anonymous access)
Unable to activate User/Password [message #1823944] Sat, 04 April 2020 11:07 Go to next message
Barry Donaldson is currently offline Barry DonaldsonFriend
Messages: 1
Registered: April 2020
Junior Member
Hi,
I seem to be unable to activate password security on my mosquitto installation (on a pi).

I've altered /etc/mosquitto/mosquitto.conf to disable anonymouse access & use an encrypted password file I created, but the publisher & subscriber still work without password etc.

I then tried using mosquitto_passwd. It all seemed to work, the next file was created, but the mosquitto.conf is unchanged & the subscriber & publisher continue to communicate.

I've been through the documentation, but can't see where I'm going wrong...

Any ideas would be gratefully asppreciated.

Ta
Barry
Re: Unable to activate User/Password [message #1824323 is a reply to message #1823944] Mon, 13 April 2020 20:50 Go to previous message
Roger Light is currently offline Roger LightFriend
Messages: 90
Registered: September 2013
Member
Hi Barry,

mosquitto_passwd just generates a password file, it doesn't modify the configuration file. You need to do that yourself. The examples below show how you could do this. They both configure two listeners in order to show the different behaviour with the per_listener_settings option, but it isn't at all necessary to configure two listeners.

# This configures all listeners to use the same password authentication
per_listener_settings false
password_file /path/to/file
allow_anonymous false

listener 1883

listener 1884


# This configures just listener 1883 to use password authentication. The listener on port 1884 allows anonymous connections without authentication.
per_listener_settings true

listener 1883
password_file /path/to/file
allow_anonymous false

listener 1884


I hope that helps.
Previous Topic:Mosquitto broker terminating and starting about every minute?
Next Topic:Data Compression
Goto Forum:
  


Current Time: Fri Apr 19 23:34:16 GMT 2024

Powered by FUDForum. Page generated in 0.03241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top