snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.45k stars 3.06k forks source link

LDAP E-Mail Login #12998

Open phosworker opened 1 year ago

phosworker commented 1 year ago

Debug mode

Describe the bug

I want that users login with their E-Mail instead of their samaccountname. LDAP Sync works fine, but the users cant login, what need i to modify?

image image image image image

i tryed "mail=" as query, I do not know how to continue....

Reproduction steps

1.setup ldap 2.set username to mail 3.try to login ...

Expected behavior

Login

Screenshots

No response

Snipe-IT Version

6.1.0

Operating System

Ubuntu

Web Server

Apache

PHP Version

7.4.3-4ubuntu2.18

Operating System

Windows

Browser

Chrome

Version

112.0.5615.138

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

[17:03:34] LOG.debug: Preparing to test LDAP login
[17:03:34] LOG.debug: Attempting to bind to LDAP for LDAP test
[17:03:34] LOG.debug: Filter query: (&(cn=*)(cn=testi@example.at))
[17:03:34] LOG.debug: Status of binding user: testi@example.at to directory: (directly!) FAILURE
[17:03:34] LOG.debug: Status of binding Admin user: testi@example.at to directory instead: FAILURE

Additional context

No response

welcome[bot] commented 1 year ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

shinduke commented 1 year ago

Hello,

can you check what exactly your users have as their username? If you have done an LDAP sync before the users are maybe created with username without the mail

phosworker commented 1 year ago

like in the pictures above, every username is their email, tryed using userPricipalName but snipe dont like that for what reason ever.

In my opinium the issue is the LDAP Auth Query, but im not sure what i should but there in?

Hello,

can you check what exactly your users have as their username? If you have done an LDAP sync before the users are maybe created with username without the mail

shinduke commented 1 year ago

This are our settings but we use SAML too so not shure if it helps. image

phosworker commented 1 year ago

This are our settings but we use SAML too so not shure if it helps. image

i tryed these settings, didnt work, i can only auth to ldap via samaccountname but not via mail

greench commented 11 months ago

I encountered same issue and found the issue. I will share the solution as a MR.

Frittenstaebchen commented 11 months ago

I encountered same issue and found the issue. I will share the solution as a MR.

i have the same issue, you can tell me the solution? @greench

U17205367 commented 10 months ago

I encountered same issue and found the issue. I will share the solution as a MR.

i have the same issue, you can tell me the solution? @greench

peacocksdevelopment commented 2 months ago

I encountered same issue and found the issue. I will share the solution as a MR.

Where is the solution shared?