GLPI automatic synchronization with LDAP "original"

Source: Internet
Author: User
Tags ldap glpi

GLPI automatic synchronization with LDAP

First in the GLPI setup.

[Find the location of the ldap_mass_sync.php script file]




[root@hghast001 etc]# find / -iname *ldap_mass_sync.php*
/var/www/html/glpi/scripts/ldap_mass_sync.php

[See instructions for using ldap_mass_sync.php scripts]





[root@nb0001 ~]# php /var/www/html/glpi1/scripts/ldap_mass_sync.php --help
Usage: php -q -f ldap_mass_sync.php [action=<option>]  [ldapservers_id=ID]
Options values:
0: import users only
1: synchronize existing users only
2: import & synchronize users
before-days: restrict user import or synchronization to the last x days
after-days: restrict user import or synchronization until the last x days
ldap_filter: ldap filter to use for the search. Value must be surrounded by ""

[Ldap_mass_sync.php Add Users]





[root@nb0001 ~]# php -q -f  /var/www/html/glpi1/scripts/ldap_mass_sync.php action=0
Processing LDAP Server: glpi, ID: 1 
...................................
Imported: 35
Synchronized: 0
Deleted from LDAP: 0

[Add and Sync]will disabled the name of the departing person





[root@nb0001 ~]# php -q -f  /var/www/html/glpi1/scripts/ldap_mass_sync.php action=2
Processing LDAP Server: glpi, ID: 1 
...............................................................
Imported: 0
Synchronized: 236
Deleted from LDAP: 34

[Auto sync per hour]


[root@hghast001 etc]# vim /etc/crontab
 1 * * * *  /usr/bin/php -q -f  /usr/bin/php -q -f  /var/www/html/glpi/scripts/ldap_mass_sync.php  action=2  >> /dev/null 2>&1

Complete

This article comes from "Life is endless, tossing and turning." "blog, declined reprint!"


GLPI automatic synchronization with LDAP "original"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.