add password check to init.sh
This commit is contained in:
parent
64853b3b14
commit
e5f2f19a69
@ -10,6 +10,11 @@ read -p "Admin User Email: " ADMIN_EMAIL
|
|||||||
read -p "Admin User CN: " ADMIN_CN
|
read -p "Admin User CN: " ADMIN_CN
|
||||||
read -p "Admin User SN: " ADMIN_SN
|
read -p "Admin User SN: " ADMIN_SN
|
||||||
read -s -p "Admin Password: " ADMIN_PASSWD
|
read -s -p "Admin Password: " ADMIN_PASSWD
|
||||||
|
echo ""
|
||||||
|
read -s -p "Confirm Password: " CONFIRM_PASSWD
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ "$ADMIN_PASSWD" = "$CONFIRM_PASSWD" ]; then
|
||||||
|
|
||||||
envsubst '$BASE_DN' < auth.template.ldif > auth.ldif
|
envsubst '$BASE_DN' < auth.template.ldif > auth.ldif
|
||||||
envsubst '$BASE_DN' < pass.template.ldif > pass.ldif
|
envsubst '$BASE_DN' < pass.template.ldif > pass.ldif
|
||||||
@ -25,3 +30,9 @@ unset ADMIN_CN
|
|||||||
unset ADMIN_SN
|
unset ADMIN_SN
|
||||||
unset ADMIN_PASSWD
|
unset ADMIN_PASSWD
|
||||||
rm auth.ldif init.ldif pass.ldif
|
rm auth.ldif init.ldif pass.ldif
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "Error: Passwords do not match."
|
||||||
|
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user