GetPassword supprimé car on source et c'est mieux !
This commit is contained in:
@@ -8,12 +8,13 @@ KAZ_ROOT=/kaz
|
||||
setKazVars
|
||||
|
||||
. $DOCKERS_ENV
|
||||
. $KAZ_BIN_DIR/getPasswords.sh ldapServ paheko
|
||||
. $KAZ_KEY_DIR/env-ldapServ
|
||||
. $KAZ_KEY_DIR/env-paheko
|
||||
|
||||
ACCOUNTS=/kaz/dockers/postfix/config/postfix-accounts.cf
|
||||
|
||||
LDAP_IP=$(docker inspect -f '{{.NetworkSettings.Networks.ldapNet.IPAddress}}' ldapServ)
|
||||
URL_GARRADIN="$httpProto://${paheko_API_USER}:${paheko_API_PASSWORD}@kaz-paheko.$(echo $domain)"
|
||||
URL_GARRADIN="$httpProto://${API_USER}:${API_PASSWORD}@kaz-paheko.$(echo $domain)"
|
||||
# docker exec -i nextcloudDB mysql --user=${nextcloud_MYSQL_USER} --password=${nextcloud_MYSQL_PASSWORD} ${nextcloud_MYSQL_DATABASE} <<< "select * from oc_accounts;" > /tmp/oc_accounts
|
||||
|
||||
ERRORS="/tmp/ldap-errors.log"
|
||||
@@ -126,7 +127,7 @@ replace: agoraEnabled\n\
|
||||
agoraEnabled: TRUE\n\
|
||||
-\n\
|
||||
replace: mobilizonEnabled\n\
|
||||
mobilizonEnabled: TRUE\n\n" | tee /tmp/ldap/${mail}.ldif | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${ldapServ_LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${ldapServ_LDAP_ADMIN_PASSWORD}
|
||||
mobilizonEnabled: TRUE\n\n" | tee /tmp/ldap/${mail}.ldif | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${LDAP_ADMIN_PASSWORD}
|
||||
done
|
||||
|
||||
#replace: nextcloudEnabled\n\
|
||||
@@ -164,7 +165,7 @@ do
|
||||
echo -e "dn: cn=${mail},ou=users,${ldap_root}\n\
|
||||
changeType: modify
|
||||
replace: mailAlias\n\
|
||||
$LIST\n\n" | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${ldapServ_LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${ldapServ_LDAP_ADMIN_PASSWORD}
|
||||
$LIST\n\n" | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${LDAP_ADMIN_PASSWORD}
|
||||
else
|
||||
echo "Alias vers un mail externe, go fichier"
|
||||
echo $line >> ${ALIASES_WITHLDAP}
|
||||
@@ -185,7 +186,7 @@ replace: mailAlias\n\
|
||||
mailAlias: ${src}\n\
|
||||
-\n\
|
||||
replace: mail\n\
|
||||
mail: ${dst}\n\n" | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${ldapServ_LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${ldapServ_LDAP_ADMIN_PASSWORD}
|
||||
mail: ${dst}\n\n" | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${LDAP_ADMIN_PASSWORD}
|
||||
fi
|
||||
else
|
||||
echo "Forward vers plusieurs adresses, on met dans le fichier"
|
||||
@@ -215,7 +216,7 @@ replace: mailAlias\n\
|
||||
mailAlias: ${src}\n\
|
||||
-\n\
|
||||
replace: mail\n\
|
||||
${LIST}\n\n" | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${ldapServ_LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${ldapServ_LDAP_ADMIN_PASSWORD}
|
||||
${LIST}\n\n" | ldapmodify -c -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w ${LDAP_ADMIN_PASSWORD}
|
||||
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user