-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
cannot get ldap working #360
Comments
Use the following debug file ( Then look in /logs or console for any errors after a login attempt. |
I determined the issue. The test user I was logging in with did not have an email address. As soon as I added an email address for the user, sign in worked perfectly. This requirement is not straightforward, because signing in with the LDAP user's email does not work as a login parameter with the searchFilter documented in your guides. However logging in with uid={{username}} works perfectly, but only if an email address is provided. Perhaps an opportunity to update documentation, but feel free to close this issue. |
Thanks, merged your PR. |
Hello! I have a problem with loging on with any domain account from using a ldap. When I insert domain account login and password - i recieve that username/password is incorrect. Ok. Then I use the debug file (/server/controllers/auth.js) to display any ldap error in the logs from NGPixel (from comment above) and now I recieve error after loging on browser: Failed to serialize user into session and also recieve errors on wiki-error-0.log file: 2018-03-15T12:44:12.276Z - ^[[31merror^[[39m: [SERVER] Error: Invalid username/password What I'm doing wrong? That's clean Instalation of wiki.js and I've enabled ldap on config.yml with this settings: ldap: Sure, have also successfully connected with multiple other LDAP service and clients without issue Will be thanksfull for any help! |
Hello, |
@Victor-Morel What you are describing is SSO, which is not supported. This will be possible in 2.0. If you have issues connecting via LDAP. Make a backup of your |
Thanks for the quick anwer! I'm not really trying to implement an SSO, I just want to use a different uid as username (not the email), is that possible? |
@Victor-Morel You can use any field you want, it doesn't have to be an email. It's what you set in the |
Ok, it looks similar to what I have previously been with. But is it possible for the logs to be more verbose? I have difficulties identifying the problem (and my LDAP config working, I'm using it with other services). |
Having similar issues. It would be very useful with a more verbose log when investigating things like authentication issues. Perhaps an environment variable that controls log verbosity? ( |
I struggled with this for quite a bit and I just wanted to share what I found. I'm not AD expert by any means so take whatever I say with a grain of salt. What I found was the base search dn does NOT do a recursive search into other OU's. So if your bind dn is ou=users,dc=mydomain,dc=local, but you have multiple OU's inside the users ou (e.g ou=office1,ou=users,dc=mydomain,dc=local) then users inside office1 will not be authenticated against. I tried playing with the search filter to include any OU's inside but I haven't gotten it to work properly. Maybe someone who is good at writing search filters can work it. This is what I came up with, but I'm pretty sure its still just searching for users inside the same OU: (&(ou:=*)(mail={{username}})) I ended up switching domains in which all users were inside a single OU so it wasn't an issue for me anymore. Hopefully this helps some of you. |
Actual behavior
Logging in through web interface fails with users that exist in ldap
Expected behavior
Login should succeed
Steps to reproduce the behavior
This works:
(returns user foo after entering root password)
However, entering the same config into
config.yml
does not:I have also successfully connected with multiple other LDAP clients without issue.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: