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

LDAP Sync Error: Invalid DN Syntax #7519

Closed
voegel916 opened this issue Oct 15, 2019 · 7 comments
Closed

LDAP Sync Error: Invalid DN Syntax #7519

voegel916 opened this issue Oct 15, 2019 · 7 comments

Comments

@voegel916
Copy link

voegel916 commented Oct 15, 2019

I've quite a bit of trouble with LDAP, but finally got it working last week and synced all of our employees into Snipe. Yesterday when I tried syncing to bring in some of our new employees, it started returning the error above. I've tried adding quotes, changing between caps/lowercase, changing the DNs, but it still gives the same error. Any advice?

Expected Behavior (or desired behavior if a feature request)

Perform LDAP User sync, new AD users are synced and added to the current list of people.


Actual Behavior

Click Synchronize, page loads for a minute before returning the message (Whoops, looks like something went wrong."


Please confirm you have done the following before posting your bug report:


  • Is this a fresh install or an upgrade?
    -- Fresh Install

  • Version of Snipe-IT you're running
    -- v4.7.4

  • Version of PHP you're running
    -- v7.2.19

  • Version of MySQL/MariaDB you're running
    -- v15.1

  • What OS and web server you're running Snipe-IT on
    -- Ubuntu 18.04, Apache

  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
    -- install.sh

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
    -- ldap_search(): Search: Invalid DN syntax /var/www/snipe-it/app/Models/Ldap.php#265

  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
    -- On the LDAP Sync page, using the synchronize button.

  • Any errors that appear in your browser's error console.
    -- Failed to load resource: the server responded with a status of 500 (Internal Server Error)

  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
    -- LDAP sync not available in the demo.

  • Include what you've done so far in the installation, and if you got any error messages along the way.
    -- Fully installed, no error messages other than LDAP.

  • Indicate whether or not you've manually edited any data directly in the database
    -- No.


Screenshots

ldap1
ldap2


  • If a stacktrace is provided in the error, include that too.
    [2019-10-15 09:13:43] production.ERROR: ldap_search(): Search: Invalid DN syntax {"userId":1,"email":"****@.com","exception":"[object] (ErrorException(code: 0): ldap_search(): Search: Invalid DN syntax at /var/www/snipe-it/app/Models/Ldap.php:265)
    [stacktrace]
    #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'ldap_search(): ...', '/var/www/snipe-...', 265, Array)
    Fix depreciation math #1 /var/www/snipe-it/app/Models/Ldap.php(265): ldap_search(Resource id Patch 1 #67, 'ou=india,ou-agr...', '(&(objectCatego...')
    Ability for admin to check out an asset to a user #2 /var/www/snipe-it/app/Console/Commands/LdapSync.php(128): App\Models\Ldap::findLdapUsers('ou=india,ou-agr...')
    Add reports - depreciation, people with no assets, etc #3 [internal function]: App\Console\Commands\LdapSync->handle()
    Add category back to Models blade/controller #4 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
    Needs sexy dashboard summary #5 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    Disallow models/depreciations/categories to be deleted if they have assets associated #6 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
    Add location to users, propagate those to assets #7 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
    Figure out how to handle multi-seat licenses #8 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
    Search box isn't hooked up to anything #9 /var/www/snipe-it/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
    Improve UI of category display to show nesting #10 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
    Build-out ACLs to set who can view which sections (reports, etc) #11 /var/www/snipe-it/vendor/symfony/console/Application.php(960): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
    A user (non-admin) should be able to request an asset [$15] #12 /var/www/snipe-it/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\LdapSync), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
    Column sorting on table displays #13 /var/www/snipe-it/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
    Add "clone" option in edit screen for assets #14 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
    Option to mark assets as requestable. #15 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Console/Application.php(177): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
    Child assets linked to parent assets (HDD, replacement parts, etc) [$100] #16 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(249): Illuminate\Console\Application->call('snipeit:ldap-sy...', Object(Illuminate\Support\Collection), NULL)
    Add warrantee field to assets/models #17 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Foundation\Console\Kernel->call('snipeit:ldap-sy...', Array)
    Move validation out of the controllers and into the models where it belongs #18 /var/www/snipe-it/app/Http/Controllers/UsersController.php(875): Illuminate\Support\Facades\Facade::__callStatic('call', Array)
    Seed database with models, manufacturers, categories, etc. #19 [internal function]: App\Http\Controllers\UsersController->postLDAP(Object(Illuminate\Http\Request))
    Import functions for users, assets, models, etc #20 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
    Merge licenses table into assets table #21 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('postLDAP', Array)
    Fix depreciation on model vs asset #22 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\UsersController), 'postLDAP')
    Support multiple companies [$500 awarded] #23 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\Routing\Route->runController()
    Tighten up checkin/checkout UX #24 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Route->run()
    Show number of assets for each asset model in listing page #25 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Handle errors more sanely when nothing in the DB #26 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Depreciation fix #27 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
    Fix tables on mobile #28 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Integrate barcode generation #29 /var/www/snipe-it/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Confirmation screens on delete #30 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle(Object(Illuminate\Http\Request), Object(Closure))
    Fixing bootstrap process with default values. #31 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Added confirmation popups for deletes #32 /var/www/snipe-it/app/Http/Middleware/CheckForTwoFactor.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Add notion of lost, stolen, out for deployment, RTD, etc #33 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure))
    Update asset index/view blade to reflect new status  #34 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Add CSV export for reports #35 /var/www/snipe-it/app/Http/Middleware/CheckLocale.php(42): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Make the Edit Profile page look less assy #36 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
    incorrect command chown in README #37 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Develop #38 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(68): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Implement settings  #39 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
    Settings edit #40 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Add asset_type to Asset controller #41 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Fix delete-check on licenses #42 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
    Fix checkout for licenses #43 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Fix depreciation report with new licenses structure #44 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    When you soft-delete a user, should free up all associated resources  #45 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
    Fix miscount on assets in user view #46 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    When the number of seats is edited, handle that smartly #47 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    LDAP authentication #48 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure))
    Calendar view(s) for asset check out/in, due date, etc. [$20] #49 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
    XSS Issues #50 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
    Add postcode to locations #51 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(590): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
    Make the report columns sortable #52 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
    Add autocomplete to the search box #53 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
    New button weirdly placed on my iPad (3rd gen) #54 /var/www/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Show months until asset is fully depreciated #55 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
    Disable sorting on action column #56 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Spaces get filtered out #57 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Modal stops passing title/message/href through if modal is canceled #58 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
    Checkin message is wrong #59 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    CSRF protect all of the things #60 /var/www/snipe-it/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    DB seed fails when mysql is in strict mode #61 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure))
    Add 'retired' status #62 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Asset Notes #63 /var/www/snipe-it/app/Http/Middleware/CheckForSetup.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Notifications for when warranties are expiring... #64 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
    Invalid SQL #65 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Broken Gravatar URL in SSL-only environments #66 /var/www/snipe-it/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Patch 1 #67 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
    Fix insecure content warnings #68 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Initial install script failing on db installation, tries to drop tables that don't exist #69 /var/www/snipe-it/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Modify the Assets and Licenses controllers and database schemas to work #70 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
    Can't edit address fields on locations #71 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Add address to location form #72 /var/www/snipe-it/app/Http/Middleware/ContentSecurityPolicyHeader.php(18): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Email input types #73 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\ContentSecurityPolicyHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
    change location to status on assets table header #74 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    License Count misreporting #75 /var/www/snipe-it/app/Http/Middleware/ReferrerPolicyHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Purchase as separate entity #76 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\ReferrerPolicyHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
    Allow '+' in Model Name & No #77 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Expand Manufacturer #78 /var/www/snipe-it/app/Http/Middleware/XssProtectHeader.php(18): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Services Management Section [big, needs fleshing out] #79 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
    Re-jigger the asset displays to make "more info" more prominent #80 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    File uploads #81 /var/www/snipe-it/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    allow more characters in model name (and number) #82 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
    Ignoring production configs #83 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Gitignore clean #84 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Replace enumeration of files with wildcard #85 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
    Cancel and back buttons on edit forms now take you back properly #86 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Make jquery data tables responsive #87 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Refactor routes/urls to resolve "assets" conflict #88 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
    Checkin/Checkout should, upon completion, take me back to whereever I came from #89 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    layout on ipad in Portrait mode is funky #90 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    1001 Queries on datatables #91 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
    Use eager loading to reduce query load on index pages #92 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
    Ensure that Settings object is only loaded once per-page #93 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
    Upgrade to bootstrap 3 #94 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
@prodweb1
Copy link

prodweb1 commented Oct 17, 2019

same issue with 4.7.5, the sync function was working before

@voegel916
Copy link
Author

Not exactly a fix, but I reinstalled Snipe-It on another VM, this time using version 4.7.7. Copied the same LDAP settings I used before, and the LDAP sync worked perfectly. Possibly a bug? It could have been something messed up during installation or configuration, though I'm not sure what since the settings are limited. Either way, it's working now, and I needed to update anyway :)

@HinchK
Copy link
Contributor

HinchK commented Apr 3, 2020

Just a head's up for anyone encountering the problem related to Invalid DN Syntax with regard to Snipe-IT LDAP Connections that were previously working in a previous release, but appear to not be working > v4.6.0.

Please check the location.ldap_ou settings across your locations, and from the CLI, try the following command:

php artisan snipeit:ldap-sync --summary --base_dn "ou=Users,dc=your,dc=domain,dc=com"

Stay safe friends!

@bruce2004x
Copy link

Dear HinchK, where is located the file that contents the location.ldap_ou settings? I run the command you said and works fine, but when I try to do the sync via GUI it fails. I have tried everithing without good results.

Thanks in advance.

@HinchK
Copy link
Contributor

HinchK commented May 26, 2020

Great question @bruce2004x - I realize now my comment may have been as clear as mud!

TLDR location.ldap_ou refers to the ldap_ou column of your Snipe-IT database's location table.

**
![Uploading image.png…]
**

When you update or create a new location, there is a field "LDAP Search OU."

The contents of that textbox are added onto the BASE-DN right before syncing; if you were to select a location from the dropdown and click "sync" - OR if you select no locations and click sync...Snipe-IT will do it's best to put your users in the right locations.

MOST of the time - if you get invalid BASE_DN, but php artisan snipeit:ldap-sync --summary works - the likely culprit is a typo in a location's ldap_ou field.

Checking for weird values from the mysql> console:

select ldap_ou 
from snipeitmaster.locations 
where ldap_ou is not null;

@bruce2004x
Copy link

Dear HinchK, you were right, I found this:

MariaDB [snipeit]> select ldap_ou from locations where ldap_ou is not null;
+---------+
| ldap_ou |
+---------+
| Ecuador |
+---------+
1 row in set (0.00 sec)

Where "Ecuador" is just the name of one of my OU's in AD. My question now is, what should I put there? just delete that value?

Thanks in advance.

@bruce2004x
Copy link

Friend,

I just run:

delete from locations where locations.ldap_ou = "record";

where "record" was the value found in the table and you know what? IT WORKED!!!!

Thanks million, I'm sure that this workaround might help others.

Best,

Eduardo from Colombia

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

4 participants