Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with mosquitto_passwd when updating existing user #1671

Closed
Lestat-GitHub opened this issue May 3, 2020 · 3 comments
Closed

Problem with mosquitto_passwd when updating existing user #1671

Lestat-GitHub opened this issue May 3, 2020 · 3 comments

Comments

@Lestat-GitHub
Copy link

Hi, I'm having trouble with mosquitto_passwd command when trying to update an existing account.

Mosquitto version: 1.6.9
OS: Ubuntu 20.04

My config file looks this :

password_file /etc/mosquitto/mosquitto.users
allow_anonymous false

If I try to create a new file from scratch using mosquitto_passwd -c mosquitto.users test
everything is ok and I can connect using mosquitto_sub -h 10.1.1.124 -u test -P password --topic "/test"

But if I try to update the password of existing 'test' account with :
mosquitto_passwd -b mosquitto.users test password

I'm not able to connect anymore and get:

mosquitto_sub -h 10.1.1.124 -u test -P password --topic "/test"
Connection error: Connection Refused: not authorised.

NOTE: If I create a file containing test:password and try to convert it using mosquitto_passwd -U mosquitto.users, everything is ok too...

Seems like updating an existing password this way if not functional.

Please find a 'working' and 'not working' password file content:

Good

test:$6$9mmdTQ3MdjMJJspM$OwBo+CEKU5bjZ66uWyg9UNmXgNRm3vCHjnnbKs5skTOFhniJoiPbZ4K9jQquZbZknw59RQZXPt0yPjDFRGJo7A==

Bad (after cmdline update)

test:$6$IFBhnVuiVViGAMtP$h/aLzXueB2pOq2J6lGgP9pRDh+eFbOQzvQqEDYhfxcL52xgR9Bu6iX5IcTYVSC+jSsmXVWXyDCFVucfgJLXaXg==

Thanks for your help.

@ralight
Copy link
Contributor

ralight commented May 3, 2020

You are correct, thanks for reporting it. Updating passwords using -b doesn't work in 1.6.9. This was reported already in #1664 and fixed, and will be in 1.6.10.

@Lestat-GitHub
Copy link
Author

Thanks for your answer, and sorry I didn't see that an issue was already opened...

I can then close this one ;)

@ralight
Copy link
Contributor

ralight commented May 5, 2020

No problem, I wouldn't expect people to look at already closed issues.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants