From: Raphaƫl Gertz Date: Tue, 21 Jun 2016 11:14:27 +0000 (+0200) Subject: Fix user login generation X-Git-Tag: 0.1~13 X-Git-Url: https://git.rapsys.eu/distcook/commitdiff_plain/6948502c421e507434d27549985d8a2c422ff0dd?ds=inline Fix user login generation Fix root.conf export format --- diff --git a/config/user.conf b/config/user.conf index c35d523..c7df1ef 100644 --- a/config/user.conf +++ b/config/user.conf @@ -1,4 +1,4 @@ -# User login (apg -M L -a 0 -m 8 -x 8 -d -n 1) -USERLOGIN=`apg -M L -a 0 -m 8 -x 8 -d -n 1` +# User login (tr -dc 'a-z' < /dev/urandom | fold -w 8 | head -n 1) +USERLOGIN=`tr -dc 'a-z' < /dev/urandom | fold -w 8 | head -n 1` # User password (apg -m 32 -x 32 -a 0 -d -n 1) USERPASS=`apg -m 32 -x 32 -a 0 -d -n 1` diff --git a/lib/export.sh b/lib/export.sh index 40e3704..c443936 100644 --- a/lib/export.sh +++ b/lib/export.sh @@ -5,5 +5,5 @@ cat /dev/null > root.conf # Append every config parameters for i in `cat config/*.conf | perl -pne 'undef $_ if /^#/; s/=.*$//'`; do - eval echo ${i}=\'\$$i\' | tee -a root.conf + echo "$i='$(eval echo \$$i)'" | tee -a root.conf done