snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

LDAP Sync with Locations issue

Open awalker520 opened this issue 8 years ago • 3 comments

Expected Behavior (or desired behavior if a feature request)

If I understand it correctly I should be able to configure the main LDAP settings menu to pull in a root Base DN for my domain. (dc=aaa,dc=bbb,dc=domain,dc=com for instance) then after that configure individual DN's for each location. Then when I do a LDAP Sync the users in the appropriate OU's should be automatically assigned to the locations.

My current LDAP settings: LDAP Integration: Checked Active Directory: Checked LDAP Password Sync: Checked

Active Directory domain: aaa.bbb.domain.com LDAP Server: ldap://server.aaa.bbb.domain.com

Use TLS: Unchecked LDAP SSL certificate validation: Unchecked

LDAP Bind Username: [email protected] LDAP Bind Password: *****

Base Bind DN: dc=aaa,dc=bbb,dc=domain,dc=com LDAP Filter: &(cn=*) Username Field: samaccountname Last Name: sn LDAP First Name: givenname LDAP Authentication query: samaccountname= LDAP Version: 3 LDAP Active Flag: LDAP Employee Number: LDAP Email:

My current Location LDAP Filter settings:

LDAP Search OU: ou=mclean,ou=locations,dc=aaa,dc=bbb,dc=domain,dc=com


Actual Behavior

LDAP Sync appears to complete but no users are imported.


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


Provide answers to these questions:

  • Is this a fresh install or an upgrade?

    Fresh installation

  • Version of Snipe-IT you're running

    v4.1.6-pre build 2963 (g83c8449)

  • Version of PHP you're running

    7.1.11

  • Version of MySQL/MariaDB you're running

    5.5.56-2

  • What OS and web server you're running Snipe-IT on

    CentOS 7, 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

    No error messages are occurring in the browser when debug is enabled.

  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error

    No error is occurring. I've been interacting with the Setup->LDAP page and Settings->Location Properties pages though.

  • If a stacktrace is provided in the error, include that too.

    NA

  • Any errors that appear in your browser's error console.

    No errors.

  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.

    Can't configure LDAP in the demo.

  • Include any additional information you can find in app/storage/logs and your webserver's logs.

    I see this event triggering frequently: "ext Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'deleted_at' in where clause is ambiguous (SQL: select count(*) as aggregate from users left join locations as locations_users on users.location_id = locations_users.id where deleted_at is not null) in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647"

I've also attached the full laravel.log file for review. laravel.log

  • Include what you've done so far in the installation, and if you got any error messages along the way.

    Installation appears to be completed successfully.

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

    Nothing edited in the database.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

https://snipe-it.readme.io/docs/getting-help

Thank you. Any help would be greatly appreciated!

awalker520 avatar Dec 13 '17 20:12 awalker520

Try it with this config: ldap

LDAP Filter: &(sAMAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2))

schmidiij avatar Dec 14 '17 13:12 schmidiij

That managed to fix it. Thanks for your help!

awalker520 avatar Dec 19 '17 21:12 awalker520

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] avatar Feb 17 '18 22:02 stale[bot]