Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Ldap Sync Auto #15635

Closed
hakihosting opened this issue Oct 8, 2024 · 3 comments
Closed

[Feature Request]: Ldap Sync Auto #15635

hakihosting opened this issue Oct 8, 2024 · 3 comments

Comments

@hakihosting
Copy link

Is your feature request related to a problem? Please describe.

Ldap Sync

Describe the solution you'd like

I would like to request the implementation of an automatic LDAP sync to run every hour. Currently, we have to manually press the "LDAP Sync" button each time, which is not efficient and may lead to delays in updating user data.

Setting up an automatic synchronization would help ensure that our LDAP data remains up to date and that users can access the system seamlessly without requiring manual intervention.

Please let me know if you need any further details or if there are any prerequisites to make this happen.

Describe alternatives you've considered

No response

Additional context

No response

@snipe
Copy link
Owner

snipe commented Oct 10, 2024

You can set up a cron or an automated task to handle that for you.

https://snipe-it.readme.io/docs/configuring-alerts-backups
https://snipe-it.readme.io/docs/ldap-sync

Snipe-IT Documentation
Starting from Snipe-IT v3.0, all automated tasks are handled via the scheduler. To set a cron job to run every minute to ping the scheduler: * /path/to/php /path/to/artisan schedule:run >> /dev/null 2>&1 The scheduler already knows how often it should trigger the individual tasks, becau...
Snipe-IT Documentation
❗️ Large LDAP Directories: In your .env file, you may need to modify the LDAP_MEM_LIM (expressed as '500M' for 500MB) and/or the LDAP_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...

@snipe snipe closed this as completed Oct 10, 2024
@hakihosting
Copy link
Author

C:\Windows\system32>C:\wamp\bin\php\php8.1.22\php.exe C:\wamp\www\5344_asset\artisan snipeit:ldap-sync

ErrorException

Attempt to read property "ldap_enabled" on null

at C:\wamp\www\5344_asset\app\Console\Commands\LdapSync.php:49
45? public function handle()
46? {
47?
48? // If LDAP enabled isn't set to 1 (ldap_enabled!=1) then we should cut this short immediately without going any further
? 49? if (Setting::getSettings()->ldap_enabled!='1') {
50? $this->error('LDAP is not enabled. Aborting. See Settings > LDAP to enable it.');
51? exit();
52? }
53?

1 C:\wamp\www\5344_asset\app\Console\Commands\LdapSync.php:49
Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Attempt to read property "ldap_enabled" on null", "C:\wamp\www\5344_asset\app\Console\Commands\LdapSync.php")

2 C:\wamp\www\5344_asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36
App\Console\Commands\LdapSync::handle()

C:\Windows\system32>

@hakihosting
Copy link
Author

And LDAP are activate
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants