defalut username/password not disabling
sphonala opened this issue · 12 comments
Hi, I've install emqx server on aws instance, I've enabled emqx-auth-username plugin and updated with my 'username' and 'password' and removed default user 'admin'/'public123', but it still accepting connections on default username and password.
@sphonala turn off the allow_anonymous
in etc/emqx.conf
## Allow anonymous authentication by default if no auth plugins loaded.
## Notice: Disable the option in production deployment!
##
## Value: true | false
allow_anonymous = true
yes, turned off and restarted emqx and rebooted also.
etc/emqx/emqx.conf
allow_anonymous = false
@zhengyupan Please check the issue
machine configuration:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
installed via repository
https://docs.emqx.io/broker/latest/en/install.html#ubuntu
Hi @sphonala ,
Could you please let me know the EMQ X's version number and upload your conf files here, I will check.
Thank you!
version emqx-4.0.1
Hi @sphonala ,
If you use the auth_username to authenticate clients, the user info cannot be removed. if you want to remove a user, you will need to delete the contents in /var/lib/emqx/data/ and restart the service, then the db will be recreated.
We don't suggest using auth_username in production environment. For its simplicity, it may be good for functional test.
@zhengyupan As I know, the emqx_auth_username
plugin provides a CLI to remove the existed users.
@sphonala Please try users list
and users del <Username>
@emqplus Thank you!
@sphonala please use emqx_ctl
tool comes with the emqx to delete user.
To make the deletion permanent, you will need to
- delete the user
emqx_ctl users del <username>
- remove the user from file
emqx_auth_username
without the step 2, the user will be still able to connect after restart.
Ok. Got it.
Thank you.