mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-11-07 19:31:58 +01:00
Change password generation to dynamic length
This commit is contained in:
parent
03ae4f61d5
commit
261770dec5
@ -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…
Reference in New Issue
Block a user