You are not logged in.
Hello,
I have configured GLPI for LDAP connection with Active Directory and it has always worked.
But I would now like to make a scheduled option to automatically synchronize user import and synchronization of existing users.
Currently I do it manually but it is inconvenient, I would like it to do it automatically every time I say so.
Thank you!
Offline
read this :
https://glpi-install.readthedocs.io/en/ … honization
then insert bin/console glpi:ldap:synchronize_users + options in your crontab (or scheduled task)
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline
but do you intend to add a scheduled task directly from glpi? because if I go to the section, the plus symbol to add a new one is disabled.
Offline
The add button for Automatic Actions is always disabled because there is no way to add your own custom action. It is only visible as a byproduct of how different item types are composed and displayed in the back-end of GLPI in 9.5 and older. In GLPI 10, the add button shouldn't be visible at all.
You must use your system's cron (Unix-based) or Task Scheduler (Windows) for this auto import/sync.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
The add button for Automatic Actions is always disabled because there is no way to add your own custom action. It is only visible as a byproduct of how different item types are composed and displayed in the back-end of GLPI in 9.5 and older. In GLPI 10, the add button shouldn't be visible at all.
You must use your system's cron (Unix-based) or Task Scheduler (Windows) for this auto import/sync.
ah, I understand.
How do I do from the command line (I have linux) to schedule the automatic update every day at 7pm?
i try the command:
php bin/console
bin/console glpi:ldap:synchronize_users - u (for synchronize existing users)
bin/console glpi:ldap:synchronize_users -c (for import new users)
they work.
i create a script .sh:
#!/usr/bin/php
../../bin/console glpi:ldap:synchronize_users -u
../../bin/console glpi:ldap:synchronize_users -c
but you can't run two commands together. do i have to make two script files? for now I have created two separate scripts.
i edited the crontab
EDITOR=nano crontab -e
I wrote this on the crontab, is it correct? the first is performed at 2 am. the second at 3
0 2 * * * root /var/www/html/glpi/scripts/ScriptMarco/aggiorna_utenti.sh
0 3 * * * root /var/www/html/glpi/scripts/ScriptMarco/importa_utenti.sh
Last edited by Afol (2022-05-09 09:25:27)
Offline
not work..
Offline
0 8 * * * cd /var/www/glpi/scripts && php -q -f ldap_mass_sync.php -- action=1 server_id=1
0 8 * * * cd /var/www/glpi/scripts && php -q -f ldap_mass_sync.php -- action=0 server_id=1
First line for synchronize existing users
second for import new users in LDAP
For the 8 AM it's just an exemple
thank you!
Offline
read this :
https://glpi-install.readthedocs.io/en/ … honizationthen insert bin/console glpi:ldap:synchronize_users + options in your crontab (or scheduled task)
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline