Closed (fixed)
Project:
LDAP integration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
18 Feb 2007 at 16:40 UTC
Updated:
7 Mar 2007 at 02:18 UTC
Is possible to add subtree checkbox option in the ldapauth module?
I have some links bellow in how to do it using PHP, I hope it helps.
http://us3.php.net/ldap_search
Thanks
Alex.
Comments
Comment #1
kreaper commentedHi Alex
PHP LDAP performs SUB scope searches by default ..
Am I missing something ? In order to do ONE level search, we'll have to use ldap_list() function
Comment #2
kreaper commentedComment #3
dinnouti commentedI just tested and seems working, for some reason it didn't in the version 4.x.x.; I really appreciate you working in this module.
Thanks
Alex.
Comment #4
dinnouti commentedSorry for the last info, I tested with one account that was in the cache, with new account it doesn't work.
The problem that I have is, we have a tree like dc=example, dc=com
- ou=USA
- ou=Canada
- ou=Mexico
- ou=Brazil
- and 30 countries
If I do in the DN in ldapauth like "dc=example,dc=com" it can't find anything, but when I do "ou=USA,dc=example,dc=com" and "ou=Canada,dc=example,dc=com" it works, the problem I have to do for each one of the 30 countries. And that's the reason I have a bug open asking to change the field type from varchar(255) to a long text.
Let me know if you need help to test, because I have a very complex LDAP/Active Directory schema.
Thanks, and sorry for the confusion
Alex.
Comment #5
kreaper commentedHi dinnouti
I have an OpenLDAP server and Active Directory and I tested them both. The code (php) DOES perform SUB SCOPE searches by default.
Does your AD restrict the search scopes ? Are there any error/debug logs in Apache and Drupal ?
kreaper
Comment #6
dinnouti commentedHi kreaper
I enable the msg function in ldapauth.conf.php, check the http error log and drupal log, but I couldn't find any error related to LDAP. I checked my AD and seems fine. I will write a small code in PHP to test and let you know what happen.
Do you know if I can add more msg functions around the ldapauth.module to show me the errors? Is there a specific place that you recommend?
Thanks
Dinnouti
Comment #7
kreaper commentedYou may want to put some msg_r() in this section of ldapauth.module
Comment #8
dinnouti commentedHi Kreaper
it is getting strange by the second, I create a piece of code (bellow) based on the module with the same user,password, etc. information just to test my Linux box and the AD. The custom code works but not the "ldapauth.module".
I have a feeling that is the caps of samaccountname, the reason is when I change in the my code from:
to
it stop working. Does it make any sense to you? We are using here AD with Windows 2003, what version are you using?
My code:
I added a watchdog in to the "ldapauth.module" and is sending the same DN and filter information from the custom code
Thoughts?
Thanks
Dinnouti
Comment #9
dinnouti commentedKreaper good news!
I found the problem it's a compatibility issue with Windows 2003 ( see: http://bugs.php.net/bug.php?id=30670 ) in LDAPInterface.php you have to add:
Like:
Please can you put this change in the HEAD files?
Thanks a lot for your time.
Dinnouti
Comment #10
kreaper commentedGood find dinnouti !
It is actually a limitation in AD2K3 with referrals.
Fixed in HEAD
Comment #11
(not verified) commented