[KLUG Members] LDAP & PHP

Adam Tauno Williams members@kalamazoolinux.org
05 Aug 2003 15:55:56 -0400


> Well, it looks like there isn't a uid attr in AD.

Not usually no - unless they've installed the UNIX services pack.  Then
one appears.

> I guess I'll have to have several versions based on the DS my clients are
> using.

If it is intended for general (public) use it is very important to
provide an abstract schema mapping layer - there is OpenLDAP, AD, NDS,
Netscape, iSecure, SunDirectory, etc... each of which go a bit their own
way, and schema will also differ a bit dependent upon site.

You may be able to be very clever and query the rootDSE of the server
and detect the DSA in use and auto-select the appropriate mappings. 
You'd just need a sample rootDSE query for each server type you want to
support.  That should be pretty simple to come by and very educational.

The following is a rootDSE query to an OpenLDAP DSA.

[awilliam@estate1 awilliam]$ ldapsearch -b "" -s base 'objectclass=*' +
"*"
version: 2
dn:
objectClass: top
objectClass: OpenLDAProotDSE
namingContexts: dc=whitemice,dc=org
namingContexts: OBJECTCLASS=RTPERSON
supportedControl: 2.16.840.1.113730.3.4.2
supportedExtension: 1.3.6.1.4.1.4203.1.11.1
supportedExtension: 1.3.6.1.4.1.1466.20037
supportedFeatures: 1.3.6.1.4.1.4203.1.5.1
supportedLDAPVersion: 2
supportedLDAPVersion: 3
subschemaSubentry: cn=Subschema
# numResponses: 2
# numEntries: 1
[awilliam@estate1 awilliam]$