[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: get all possible attributes of one objectclass

Hi Kevin,

maybe I didn´t describe detailed enought what I need:

I need to know, which attributes are possible in an objectclass - not
which attributes already exist.

I´m writing a client application which allows to add entries. Therefor I
need to know which attributes does the server support with the specified

With `ldapsearch -b "cn=subschema" -s base "(objectclass=*)"
you get all(!) possible objectclasses (likely specified in rfc2252)(
e.g. you get an output like this:

objectClasses=( NAME 'subschema' DESC 'RFC2252: controlling
subschema' AUXILIARY MAY ( dITStructureRules $ nameForms $
ditContentRules $ objectClasses $ attributeTypes $ matchingRules $
matchingRuleUse ) )
objectClasses=( NAME 'top' ABSTRACT MUST objectClass )
objectClasses=( NAME 'alias' SUP top STRUCTURAL MUST
aliasedObjectName )
objectClasses=( NAME 'country' SUP top STRUCTURAL MUST c MAY (
searchGuide $ description )

My programming-destination is as follows:

If you want to add an employee - you get all attributes for the
specified objectclass DNIEmployee from the server.
If you add an supplier you need other informations - these Information
is supported by an objectclass DNIsupplier in the server.

The Advantage is, that there is no client configuration necessary - all
information is configured server-sided - assumed there is an way to get
these information out of the server !

Thanks for your reply,


"Kevin J. Menard, Jr." wrote:
> Hey Marcel,
> Monday, August 06, 2001, 2:02:38 AM, you wrote:
> MB> /* posted before in wrong position - sorry... */
> MB> Hi,
> MB> I´m trying to find an way to get all possible attributes for only one
> MB> particular objectclass.
> man ldapsearch.
> Try ldapsearch -b 'dc=base,dc=org' -x '(objectclass_here=*)'
> Replace dc=base,dc=org with your diretory base.  Replace objectclass_here
> with what you want (uid, cn, et cetera).  And this assumes you don't have
> ACLs in place to prohibit anonymous searching on all attributes.
> --
>  Kevin