From 29984bb6f909551b1951196757d99792a2570450 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 1 Jul 2020 21:29:35 +0100 Subject: feat(tools/hash-password): Add a wrapper script for slappasswd This wrapper script correctly invokes slappasswd for generating ARGON2 hashes. People without Nix will need to figure this out on their own. Change-Id: I264715ba4932855b868bef70cc9102515b3d129e Reviewed-on: https://cl.tvl.fyi/c/depot/+/833 Tested-by: BuildkiteCI Reviewed-by: BuildkiteCI Reviewed-by: Kane York --- tools/hash-password.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tools/hash-password.nix (limited to 'tools') diff --git a/tools/hash-password.nix b/tools/hash-password.nix new file mode 100644 index 0000000000..9893d52178 --- /dev/null +++ b/tools/hash-password.nix @@ -0,0 +1,7 @@ +# Utility for invoking slappasswd with the correct options for +# creating an ARGON2 password hash. +{ pkgs, ... }: + +pkgs.writeShellScriptBin "hash-password" '' + ${pkgs.openldap}/bin/slappasswd -o module-load=pw-argon2 -h '{ARGON2}' +'' -- cgit 1.4.1