From 14efad4a4ad4421d18bde11de7d23803b581864c Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 24 May 2023 22:48:28 +0400 Subject: [PATCH] Rewrote gen-salt.sh in a right way. --- tools/gen-salt.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/gen-salt.sh b/tools/gen-salt.sh index 17e749e..92a5322 100755 --- a/tools/gen-salt.sh +++ b/tools/gen-salt.sh @@ -6,7 +6,5 @@ else char_num=64; fi -cat /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&*' | fold -w $char_num | head -n 1 | systemd-creds encrypt -p - /tmp/salt - -cat /tmp/salt -rm /tmp/salt \ No newline at end of file +cat /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&*' | fold -w $char_num \ + | head -n 1 | systemd-creds encrypt -qp --name=salt - - 2> /dev/null \ No newline at end of file