Multiple users with hashedPassword is broken in mosquitto
If you have more than 1 User with hasedPassword Option set it generates ``` rm -f /var/lib/mosquitto/passwd touch /var/lib/mosquitto/passwd echo 'user1:$6$xxx' > /var/lib/mosquitto/passwd echo 'user2:$6$xxx' > /var/lib/mosquitto/passwd ``` Which ends up in only having 1 user.
This commit is contained in:
parent
693ab60bb4
commit
7e76b127cd
@ -212,7 +212,7 @@ in
|
||||
'' + concatStringsSep "\n" (
|
||||
mapAttrsToList (n: c:
|
||||
if c.hashedPassword != null then
|
||||
"echo '${n}:${c.hashedPassword}' > ${cfg.dataDir}/passwd"
|
||||
"echo '${n}:${c.hashedPassword}' >> ${cfg.dataDir}/passwd"
|
||||
else optionalString (c.password != null)
|
||||
"${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} ${c.password}"
|
||||
) cfg.users);
|
||||
|
Loading…
Reference in New Issue
Block a user