From 56e53045aaf46f013c336830bd911eebb8d79ffe Mon Sep 17 00:00:00 2001 From: Fab Date: Thu, 10 Sep 2026 17:04:10 +0200 Subject: [PATCH] =?UTF-8?q?remet=20g=C3=A9n=C3=A9ration=20du=20mdp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/gestUsers.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/gestUsers.sh b/bin/gestUsers.sh index 03f41ac..5a4d1de 100755 --- a/bin/gestUsers.sh +++ b/bin/gestUsers.sh @@ -395,6 +395,8 @@ searchDestroy() { gestPassword() { ACTION_EN_COURS="Gestion du mot de passe d'un compte" searchEmail + #cree un mdp acceptable par postfix/nc/mattermost + PASSWORD=_`apg -n 1 -m 10 -M NCL -d`_ COMPTE_A_MODIFIER=${CHOIX_MAIL} # On considère le mot de passe de secours de ldap MAIL_SECOURS=$(ldapsearch -H ldap://${LDAP_IP} \ @@ -436,7 +438,7 @@ gestPassword() { #maj du mdp sur mattermost avec l'api et non plus avec mmctl #docker exec -ti mattermostServ bin/mmctl user change-password $(searchMattermost ${COMPTE_A_MODIFIER}) -p ${PASSWORD} >/dev/null 2>&1 USER_ID=$(searchMattermost "${COMPTE_A_MODIFIER}") - echo "user_id = "$USER_ID + #echo "user_id = "$USER_ID . "$KAZ_KEY_DIR/env-mattermostAdmin" #il arrive que l'api MM sorte un 401, je boucle @@ -449,7 +451,7 @@ gestPassword() { "${URL_AGORA_API}/users/${USER_ID}/password" \ -d "{\"new_password\":\"${PASSWORD}\"}") - echo "Mattermost : HTTP <${HTTP_CODE}>" + #echo "Mattermost : HTTP <${HTTP_CODE}>" if [ "${HTTP_CODE}" = "200" ] then