>>> Howard Chu <[email protected]> schrieb am 25.07.2017 um 15:10 in Nachricht
<[email protected]>:
> Ulrich Windl wrote:
>>>>> Howard Chu <[email protected]> schrieb am 25.07.2017 um 14:27 in Nachricht
>> <[email protected]>:
>>> Ulrich Windl wrote:
>>>> BTW: Is there an LDAP query to get the schema name for an object class?
>>>> I can list objectclasses and schematas, but I miss the link between those.
>>>
>>> You can search under cn=schema,cn=config using filter
>>> (olcObjectClasses=*<objectclass name>*)
>> 
>> Hi!
>> 
>> Thanks, but I don't quite get it: If I'm trying for "ipService" (which is 
> known), I get an empty result:
>> 
>> # ldapsearch -Y EXTERNAL -H ldapi:/// -b 'cn=schema,cn=config' -s one 
> '(olcObjectClasses=ipService)' '* +'
>> SASL/EXTERNAL authentication started
>> SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
>> SASL SSF: 0
>> # extended LDIF
>> #
>> # LDAPv3
>> # base <cn=schema,cn=config> with scope oneLevel
>> # filter: (olcObjectClasses=ipService)
>> # requesting: * +
>> #
>> 
>> # search result
>> search: 2
>> result: 0 Success
>> 
>> Can you give a concrete example, maybe?
> 
> Pay attention to details.
> 
> The filter I specified was ( * <objectclass name> * ) - a substring filter.
> 
> The filter you used was an exact match filter, which obviously doesn't match 
> 
> anything.

Thanks for pointing that out, Howard,

the meta-language is somewhat imprecise: I had interpreted that to be a pattern 
to substitute. Now this command provided what I was looking for:
# ldapsearch -Y EXTERNAL -H ldapi:/// -b 'cn=schema,cn=config' -s one 
'(olcObjectClasses=*ipService*)' dn

# {3}rfc2307bis, schema, config
dn: cn={3}rfc2307bis,cn=schema,cn=config

Regards,
Ulrich


> 
> -- 
>    -- Howard Chu
>    CTO, Symas Corp.           http://www.symas.com 
>    Director, Highland Sun     http://highlandsun.com/hyc/ 
>    Chief Architect, OpenLDAP  http://www.openldap.org/project/ 





Reply via email to