mirror of
https://git.bashclub.org/bashclub/zamba-lxc-toolbox.git
synced 2025-07-22 19:54:26 +02:00
Change password generation to dynamic length
This commit is contained in:
parent
03ae4f61d5
commit
261770dec5
1 changed files with 2 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This script has basic functions like a random password generator
|
||||
LXC_RANDOMPWD=32
|
||||
|
||||
random_password() {
|
||||
set +o pipefail
|
||||
C_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c32
|
||||
C_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c${LXC_RANDOMPWD}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue