mosquitto_pyauth icon indicating copy to clipboard operation
mosquitto_pyauth copied to clipboard

No module named mosquitto_auth

Open huytn opened this issue 8 years ago • 6 comments

how to install this module

huytn avatar Apr 28 '16 08:04 huytn

Try to set a proper PYTHONPATH environment variable should works.

imZack avatar Sep 22 '16 07:09 imZack

@imZack how to do it? help please!

FRANZEE avatar Aug 07 '17 11:08 FRANZEE

@FRANZEE I have created a pull request to specify module path in mosquitto config instead of using PYTHONPATH https://github.com/mbachry/mosquitto_pyauth/pull/8

viraja1 avatar Aug 07 '17 17:08 viraja1

Hi, I have the same problem and don't know how to set PYTHONPATH that it will work. Any help would be great!

tanktoo avatar Sep 28 '17 13:09 tanktoo

PYTHONPATH is an environment variable. Have a look at https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH

export PYTHONPATH=/path/to/module
mosquitto -c your_config_file.conf

or when using bash this will also work:

PYTHONPATH=/path/to/module mosquitto -c your_config_file.conf

jaydg avatar Oct 18 '17 11:10 jaydg

in mosquitto.conf make:

auth_plugin /usr/local/lib/mosquitto/auth_plugin_pyauth.so auth_opt_pyauth_module mosquitto_auth

EXPORT pythonpath:

export PYTHONPATH=/usr/lib/mosquitto

and run

mosquitto -c /etc/mosquitto/mosquitto.conf

1561325989: mosquitto version 1.6.3 starting 1561325989: Config loaded from /etc/mosquitto/mosquitto.conf. 1561325989: Loading plugin: /usr/local/lib/mosquitto/auth_plugin_pyauth.so 1561325989: ├── Username/password checking enabled. 1561325989: ├── TLS-PSK checking enabled. 1561325989: └── Extended authentication not enabled. 1561325989: Opening ipv4 listen socket on port 8883. 1561325989: Opening ipv6 listen socket on port 8883.

DxrMorgan avatar Jun 23 '19 21:06 DxrMorgan