Skip to content

Commit

Permalink
Merge pull request #24 from grml/zeha/random-passwd
Browse files Browse the repository at this point in the history
Restore randomized password feature
  • Loading branch information
zeha authored Dec 20, 2024
2 parents b67d7ae + 8006fa3 commit 854d8c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoconfig.functions
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ set_passwd() {
[ -n "$PASSWD" ] && return 0

if [ -x /usr/bin/xkcdpass ] ; then
PASSWORD="$(xkcdpass)"
PASSWD="$(xkcdpass)"
elif [ -x /usr/bin/diceware ] ; then
PASSWORD="$(diceware)"
PASSWD="$(diceware)"
else
PASSWORD="$(tr -dc '[:alnum:]' < /dev/urandom | head -c 28)"
PASSWD="$(tr -dc '[:alnum:]' < /dev/urandom | head -c 28)"
fi
}

Expand Down

0 comments on commit 854d8c9

Please sign in to comment.