From: Chris R. <Chr...@me...> - 2000-06-20 13:49:39
|
On Sun, 18 Jun 2000 20:06:35 PDT, Yann Ramin wrote: > Hi again, > > I've been looking through the examples and documentation and can'r > figure this one out: > > How do I get object attributes if I know the object dn? > > I've tried doing a search with the filter being (dn=$dn), but this > didn't lead anywhere. It seems inefficient knowing only, say, the cn, > and doing searches every single time for this. > > Yann You just read the entry. LDAP does not have a read operation, so it must be simulated with a base object search. The search filter must be written to always match the entry - typically a filter of (objectclass=*) is used which will always work because every entry must have an objectclass attribute. The reason that a filter of (dn=$dn) does not work is because entries do not typically have an attribute called 'dn'. Hence filtering on the attribute is usually meaningless. Cheers, Chris |