summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2020-01-09 19:19:49 +0000
committerMike Crute <mike@crute.us>2020-01-09 19:23:51 +0000
commit1fe8647502560320171b3ff19c34945d23a29c75 (patch)
treeec9d9dbcda9cc6d8d6cc2e3c21cc79d5b24266a6 /bin
parentedd8d49f13f5abb402d68e4f4672cf700e72b232 (diff)
downloaddotfiles-1fe8647502560320171b3ff19c34945d23a29c75.tar.bz2
dotfiles-1fe8647502560320171b3ff19c34945d23a29c75.tar.xz
dotfiles-1fe8647502560320171b3ff19c34945d23a29c75.zip
Import password script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/secure-passwd.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/secure-passwd.sh b/bin/secure-passwd.sh
index 25a4ef1..82362f4 100755
--- a/bin/secure-passwd.sh
+++ b/bin/secure-passwd.sh
@@ -1,6 +1,8 @@
1#!/bin/bash 1#!/bin/bash
2 2
3pass=$(dd if=/dev/urandom count=1 bs=32 2>&1 | base64 | tr -dc '[:alnum:]' | cut -b -26) 3#recipe="[:graph:]"
4recipe="[:alnum:]"
5read -r -n 26 pass < <(LC_ALL=C tr -dc "$recipe" < /dev/urandom)
4if [ "$1" = "-n" ]; then 6if [ "$1" = "-n" ]; then
5 echo -n $pass 7 echo -n $pass
6else 8else