LDAP Sync
Large LDAP DirectoriesIn your
.envfile, you may need to modify theLDAP_MEM_LIM(expressed as '500M' for 500MB) and/or theLDAP_TIME_LIM(expressed in seconds) in order to avoid a large LDAP sync from timing out or exhausting all memory.The default time limit is 10 minutes. The default memory limit is 500MB.
You can set up a cron to automatically sync LDAP users using the following:
# Run an LDAP sync with optional location name or location ID, and optionally output a summary
$ php artisan snipeit:ldap-sync {--location=} {--location_id=} {--summary}
location and location_id are optional.
So for example, if you know the location_id of the location you're trying to add the users to, you could use:
# Run an LDAP sync for location ID 1 with a summary
$ php artisan snipeit:ldap-sync --location_id=1 --summary
Or if you know the name of the location, you could use:
# Run an LDAP sync the location named Lisbon with a summary
$ php artisan snipeit:ldap-sync --location=Lisbon --summary
See the full documentation on LDAP Syncing for more information.
For Hosted Snipe-IT CustomersIf you need to set up an LDAP sync cron job on the hosted platform, just shoot us an email at [email protected] and we'll get you sorted. :)
Updated 20 days ago
