Hi everyone,
We are trying to get the LDAP authentication module working (without any other of the other ldap modules enabled just yet) and it seems that it binds ok but the search filter is wrong.
Here is the log when a user logs in successfully using our management console program
conn=7 op=2 SRCH base="dc=msl,dc=ubc,dc=ca" scope=2 filter="(&(objectClass=posixAccount)(uid=username))" attrs=ALL
conn=7 op=2 RESULT err=0 tag=101 nentries=1 etime=0
Here is the log when a user tries to log in using the ldap auth module
conn=11 op=2 SRCH base="dn=msl,dn=ubc,dn=ca" scope=2 filter="(uid=username)" attrs=ALL
conn=11 op=2 RESULT err=32 tag=101 nentries=0 etime=0
The problem is in the filter. How can I set it to include the posix account class?
Thank you
- Vince
Comments
Comment #1
miglius commentedComment #2
miglius commentedPlease test the attached patch which adds a user filter configuration option. The site update should be run after the code is patched.
Comment #3
vincetingey commentedHi Miglius
Sorry it was a typo problem on my behalf...
In the log I posted above you can see "dc=msl,dc=ubc,dc=ca" for the base whereas I had it set to "dn=msl,dn=ubc,dn=ca" in the ldap auth configuration...
Thank you very much for responding and writing a patch in such quick time though. After I changed it to dc= instead of dn= it worked fine. I can still test the patch if you like but I'd rather not due to wanting to test just the official beta release of this module without modifications.
Thank you again.
Comment #4
miglius commentedGlad you're good now. Anyway, this patch could be used for restricting authentication based on some custom filters. If there is a need for this I might include it into the module though.