diff options
author | Florian Baumann <flo@noqqe.de> | 2018-02-08 22:46:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-08 22:46:06 +0100 |
commit | 7e76b127cd36d0310fdf98afd66e1999b4fc0d35 (patch) | |
tree | c5e698733bd41b44ff7d274b46af1d2ee4eb9fe1 /nixos | |
parent | 693ab60bb4f7e2cf542cd87f23cfd4b0bf5d110a (diff) | |
download | nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.tar nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.tar.gz nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.tar.bz2 nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.tar.lz nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.tar.xz nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.tar.zst nixlib-7e76b127cd36d0310fdf98afd66e1999b4fc0d35.zip |
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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/mosquitto.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index 273ca797b98d..d8135f4d0ffa 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -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); |