mirror of
				https://github.com/bashclub/zamba-lxc-toolbox.git
				synced 2025-11-04 00:02:26 +01:00 
			
		
		
		
	Change password generation to dynamic length
This commit is contained in:
		@@ -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}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user