[Date Prev][Date Next]
attributetype and objectclass newbie questions
- To: openldap-software@OpenLDAP.org
- Subject: attributetype and objectclass newbie questions
- From: jay alvarez <firstname.lastname@example.org>
- Date: Mon, 13 Jun 2005 20:21:46 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6W7Nfod9em9IsCyy/flREqKd3OAIyxAgVEIHn37bsCV4vDYidhQbbutWSDL/wExf8ak578KC3HB45pe0huTeWYTUiuXLgE+AhakWk7jDztWjQuApGC0VBZKc3Aq0cVYYVKq3nRmAA9hWZegkNC7OwEaurODbGPTkFyPusIJzgMY= ;
My goal is to configure an openldap directory for
our small office that will hold my officemates
miscellaneous details. So far I already configured a
working heimdal kerberos authentication and get my
self a bit familiar with its operation. I also manage
to get GSSAPI work using sample-client/server. I even
successfully added the sample entry in my database,
the one that was provided by Administration
Guide(example.com etc.) in Quick Start Guide. Now I
would like to create some entries of my own using
ldapadd/slapadd, but my problem is that the portion in
the Admin Guide which discusses schema only refers to
extending schema and not with "beginning with schema"
or something else which addresses newbies. ldif(5)
won't help either because it only includes sample
entries but didn't explained where it got those
miscellaneous attrdesc like "dn" and "cn" and why are
they needed. With this, I have a few questions
floating in my mind:
1. First of all, looking at the example.com ldif on
Quick Start Guide, there were two entries. The first
entry has a dn: dc=example,dc=com. Does this mean that
if I were to create person entries under a particular
domain or let's say an organization, I will need to
place that domain/organization entry above the person
entry I am creating?
What if that domain/organization entry already exists
or let's say other entries, and if I were to add some
entries at the bottom of my ldif file, can I run
ldapadd using that ldif file without running into any
trouble because entries above are already existing?
2. How about attributetype and objectclass:
Can I include any attributetype in an entry, provided
that the correct schema files which contains those
attributes where included?
Are objectclass necessary in each entry?
Quoting from intro.html:
"In addition, LDAP allows you to control which
attributes are required and allowed in an entry
through the use of a special attribute called
objectClass. The values of the objectClass attribute
determine the schema rules the entry must obey."
..Or does this mean that if I were to indicate an
"objectclass: person" in an entry, I am enforcing the
inclusion of a "cn" or "sn" attributetype in that
particular entry knowing the the "person" objectclass
in core.schema has a MUST "sn $ cn"?
3. I tried creating my very first ldif with the
following contents, on top is the entry for our
domain, camlann.pregi.net and following it are entries
for 3 persons. After running ldapadd -x -D
"cn=matato,dc=camlann,dc=pregi,dc=net" -W -f
camlann.ldif, I got these messages:
Enter LDAP Password:
adding new entry "dc=camlann,dc=pregi,dc=net"
adding new entry "cn=Mark Jayson R
ldap_add: Naming violation (64)
additional info: value of naming attribute
'cn' is not present in entry
Would you happen know what's wrong with my ldif, or
where should I start if I were to learn how to create
an ldif file the right way?
<<< camlann.ldif >>>
description: Advance Science and Technology Institute
dn: cn=Mark Jayson R
dn: cn=Bayani Benjamin R
dn: cn=Mark Christian D
cn: yan yan
Thank you very much for your time.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around