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

Hi

i use this code in php

$userName = "myUsername";
$RndPsw  = "myPassword";
               
$command = "mosquitto_passwd -b /var/www/MQTT/users ".$userName." ". $RndPsw ;
exec($command , $out );
$mystring = "mosquitto";
exec("ps aux | grep \"${mystring}\" | grep -v grep | awk '{ print $2 }' | head -1", $out); // find process
exec("kill -1 " .$out[0]);  // reset mosquitto


On 07/26/2016 12:49 PM, Srinivas Pokala wrote:
Hi,

Username successfully created using linux command with:  "mosquitto_passwd /etc/mosquitto/passwd guest".

I need to create same with php or _javascript_ how?

Thanks
Srinivas


_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top