mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2025-04-21 20:59:47 +02:00
Change password generation to dynamic length
This commit is contained in:
parent
03ae4f61d5
commit
261770dec5
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script has basic functions like a random password generator
|
# This script has basic functions like a random password generator
|
||||||
|
LXC_RANDOMPWD=32
|
||||||
|
|
||||||
random_password() {
|
random_password() {
|
||||||
set +o pipefail
|
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…
x
Reference in New Issue
Block a user