Username & Password Authentication

223 views
Skip to first unread message

Henrik

unread,
Jan 8, 2016, 2:19:36 AM1/8/16
to emqtt
Hi!

I can't figure out how to enable username & password authentication.
In other words I don't know in what format to put the username and password in the .config file.

Let's say I want username = "test" and password = "test"
How to put this in the config file?

%% Authentication with username, password
            {username, []}


Thanks!

Henrik

unread,
Jan 11, 2016, 8:44:59 AM1/11/16
to emqtt, henkeo...@gmail.com
Turns out I just didn't read the documentation well enough!

I write a short "How to" if someone else is stupid enough to miss it like I did! :)

To enable username and password authentication simply uncomment %{username, []} (remove the %) in emqttd.config.
Then use emqttd_ctl to add or remove users as described in the documentation (https://github.com/emqtt/emqttd/wiki/Authentication):

load user with './bin/emqttd_ctl'

Load user with './bin/emqttd_ctl users' command.

./bin/emqttd_ctl users add <Username> <Password>

Thanks for a great broker!

sande...@gmail.com

unread,
Sep 21, 2016, 7:47:26 AM9/21/16
to emqtt, henkeo...@gmail.com, henrik...@evry.com
Hi,

I used the same command(./bin/emqttd_ctl users add <Username> <Password>) but I am not getting created user list. where should i find it?

Thanks,

domnic....@gmail.com

unread,
Nov 13, 2019, 11:51:34 AM11/13/19
to emqtt
Hi
I am new here. I am using EMQX 3.2.4.  I could not find this emqttd. Neither is there any possibility for me to download and install it. I am using CentOS 7.
could you perhaps guide me about how to add a user for basic authentication ?. 
I tried adding a user via the dashboard.. unfortunately that did not work from my MQTT client.
Only thing that works is anonymous and SSL with certificates. I need to use Basic authentication.

Any help would be appreciated
kind regards
DS
Reply all
Reply to author
Forward
0 new messages