Synchro Auto LDAP

Installation & Configuration du logiciel
Répondre
GuiMBA
Gsup LEVEL 3
Messages : 72
Enregistré le : ven. 3 mars 2017 10:12

Bonjour,

Je rencontre un problème avec la synchronisation LDPA automatique de mes 8 serveurs Gestsup.
Le connecteur LDAP fonctionne très bien, la synchro manuelle également mais pas moyen de faire fonctionner l'automatisée.
Si je lance php /var/www/html/core/ldap.php en direct, tout fonctionne bien.
J'ai donc mis ça dans la crontab mais sans succès...

* * * * * root php /var/www/html/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload

Une idée svp ?
Avatar du membre
Flox
Administrateur du site
Messages : 8973
Enregistré le : jeu. 21 juin 2012 19:00

Bonjour,

Pouvez vous transmettre un impression écran de votre page système ?

Et un impression écran du fichier /etc/crontab

Cdt
GestSup: 3.2.47 | Debian: 12 | Apache: 2.4.58 | MariaDB: 11.3.2 | PHP: 8.3.4 | https://doc.gestsup.fr/
GuiMBA
Gsup LEVEL 3
Messages : 72
Enregistré le : ven. 3 mars 2017 10:12

Voici mes paramètres système :
Image

Et la Crontab :

Code : Tout sélectionner

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

* * * * *   root php /var/www/html/INFO/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/SG/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/RH/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/MOA/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/DRQ/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/COM/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/CDG/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
* * * * *   root php /var/www/html/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload

*/15 *  * * *   root    service ntp start | while IFS= read -r line; do echo "$(date) $line"; done >> /home/cron_ntp.log
Avatar du membre
Flox
Administrateur du site
Messages : 8973
Enregistré le : jeu. 21 juin 2012 19:00

Vous avez du faire une erreur de copier coller. La section suivante ne doit pas apparaître :

Code : Tout sélectionner

" >> /etc/crontab && service cron reload
Attention également à la fréquence d'interrogation vous synchroniser plusieurs fois par minute, augmenter ce délai car la tâche peut prendre plus d'une minute.

Il est recommandé de lancer la synchronisation une fois par jour cf. FAQ de la Doc.

Cdt
GestSup: 3.2.47 | Debian: 12 | Apache: 2.4.58 | MariaDB: 11.3.2 | PHP: 8.3.4 | https://doc.gestsup.fr/
GuiMBA
Gsup LEVEL 3
Messages : 72
Enregistré le : ven. 3 mars 2017 10:12

Oui effectivement je m'étais trompé dans mon copier/coller. J'avais mis la synchro "immédiate" uniquement pour mes tests.
Ca fonctionne et j'ai remis la synchro quotidienne 1 fois par jour.

Merci à vous ;)
GuiMBA
Gsup LEVEL 3
Messages : 72
Enregistré le : ven. 3 mars 2017 10:12

Par contre, quel est le fonctionnement en terme de suppression d'un compte AD ?
L'utilisateur GestSup n'est pas sensé se désactiver de manière automatique via cette synchro ?...car là ce n'est pas le cas chez moi.
Les user se créés bien mais pas de désactivation en cas de suppression d'un compte AD.
Avatar du membre
Flox
Administrateur du site
Messages : 8973
Enregistré le : jeu. 21 juin 2012 19:00

cf paramètres et documentation :
https://doc.gestsup.fr/config/#connecteur-ldap
Fichiers joints
2021-10-19 14_21_11_screenshot_gestsup.png
2021-10-19 14_21_11_screenshot_gestsup.png (34.69 Kio) Vu 1259 fois
GestSup: 3.2.47 | Debian: 12 | Apache: 2.4.58 | MariaDB: 11.3.2 | PHP: 8.3.4 | https://doc.gestsup.fr/
GuiMBA
Gsup LEVEL 3
Messages : 72
Enregistré le : ven. 3 mars 2017 10:12

Ce paramètre était bien sur "Oui".
Pour information, j'a du le positionner à "Non" puis remettre "Oui" et c'est revenu dans l'ordre.
Répondre