Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] How to create users using php or javascript in mosquitto


I successfully username and password authenticated with Mysql.

My question is, how to encrypt password using php?   (accorind to video in command line using ./np)


On Mon, Aug 1, 2016 at 1:23 PM, Mikkel Kirkgaard Nielsen <miki@xxxxxxxxx> wrote:
Hi again Srinivas.

On 2016-08-01 09:14, Srinivas Pokala wrote:
> usernames write into "passwd" file, but when file size reached
> 20-30kb removed old data and  file writing started from 0kb
> is there any file size limit in config file?

Doesn't seem so, here's 5000 users generated by mosquitto_passwd
occupying ~600KiB;

$ touch ~/mosq_passwd_test
$ for i in $(seq 0 5000); do mosquitto_passwd -b ~/mosq_passwd_test
Bitten$i Insect; done
$ ls -l ~/mosq_passwd_test
-rw-rw-r-- 1 miki miki 599010 Aug  1 09:40 /home/miki/mosq_passwd_test
$ wc -l ~/mosq_passwd_test
5001 /home/miki/mosq_passwd_test

> otherwise how can I resolve this?

Find out who zeroes the file while processing it in your environment?
Without more elaborate information or code to look at we can only do
guesswork. Maybe your are writing to the file from different processes?

Have you considered the pure PHP approach I suggested in This
is much more clean and surely more secure and efficient than shelling
out for every user.


mosquitto-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top