Discussion:
dc attribute not allowed
Loren M. Lang
2004-01-24 06:46:50 UTC
Permalink
I'm trying to add entries into an openldap database base, but it keeps
rejecting the entries. I tried adding the following:

dn: dc=tallye, dc=com
objectClass: person
cn: B
sn: s

but ldapadd gives me the error message:
additional info: naming attribute 'dc' is not present in entry
So I added the dc entry as follows:

dn: dc=tallye, dc=com
objectClass: person
dc: tallye
cn: B
sn: s

And now it gives me the following error message:
additional info: attribute 'dc' not allowed
I can't figure out what's wrong. I'm using OpenLDAP-2.1.23 on FreeBSD
4.9. Please CC me as I don't think I've subscribed correctly.
--
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C
Peter Marschall
2004-01-24 13:02:00 UTC
Permalink
Hi,
Post by Loren M. Lang
I'm trying to add entries into an openldap database base, but it keeps
dn: dc=tallye, dc=com
objectClass: person
cn: B
sn: s
additional info: naming attribute 'dc' is not present in entry
dn: dc=tallye, dc=com
objectClass: person
dc: tallye
cn: B
sn: s
additional info: attribute 'dc' not allowed
I can't figure out what's wrong. I'm using OpenLDAP-2.1.23 on FreeBSD
4.9. Please CC me as I don't think I've subscribed correctly.
Objectclass person does not allow the attribute dc.

Peter
--
Peter Marschall
eMail: ***@adpm.de
Loren M. Lang
2004-01-25 04:06:07 UTC
Permalink
Post by Peter Marschall
Hi,
Post by Loren M. Lang
I'm trying to add entries into an openldap database base, but it keeps
dn: dc=tallye, dc=com
objectClass: person
cn: B
sn: s
additional info: naming attribute 'dc' is not present in entry
dn: dc=tallye, dc=com
objectClass: person
dc: tallye
cn: B
sn: s
additional info: attribute 'dc' not allowed
I can't figure out what's wrong. I'm using OpenLDAP-2.1.23 on FreeBSD
4.9. Please CC me as I don't think I've subscribed correctly.
Objectclass person does not allow the attribute dc.
But why does it complain about it missing when I don't include it?
Post by Peter Marschall
Peter
--
Peter Marschall
!DSPAM:4012702c120712109546591!
--
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C
Jim C.
2004-01-25 06:11:35 UTC
Permalink
| But why does it complain about it missing when I don't include it?

|>>dn: dc=tallye, dc=com
~ ^
Try removeing the space between , and dc.
None of my ldifs have a space.
- --

- -----------------------------------------------------------------
| I can be reached on the following messenger services: |
|---------------------------------------------------------------|
| MSN: ***@hotmail.com AIM: WyteLi0n ICQ: 123291844 |
|---------------------------------------------------------------|
| Y!: j_c_llings Jabber: ***@nureality.com |
- -----------------------------------------------------------------
Quanah Gibson-Mount
2004-01-25 06:36:03 UTC
Permalink
--On Saturday, January 24, 2004 8:06 PM -0800 "Loren M. Lang"
Post by Loren M. Lang
Post by Peter Marschall
Hi,
Post by Loren M. Lang
I'm trying to add entries into an openldap database base, but it keeps
dn: dc=tallye, dc=com
objectClass: person
cn: B
sn: s
additional info: naming attribute 'dc' is not present in entry
dn: dc=tallye, dc=com
objectClass: person
dc: tallye
cn: B
sn: s
additional info: attribute 'dc' not allowed
I can't figure out what's wrong. I'm using OpenLDAP-2.1.23 on FreeBSD
4.9. Please CC me as I don't think I've subscribed correctly.
Objectclass person does not allow the attribute dc.
But why does it complain about it missing when I don't include it?
Because when you declare a DN, like dc=tallye, that component must also
appear as a member of the entry.

Examples:

cn=quanah,cn=accounts,dc=stanford,dc=edu
is my account dn.

cn: quanah

must appear in the entry.

dc=stanford,dc=edu

dc: stanford

must appear in the entry.

etc.

You have multiple problems with your LDIF.

You need to use objectClasses that correspond to your attributes.

--Quanah



--
Quanah Gibson-Mount
Principal Software Developer
ITSS/TSS/Computing Systems
ITSS/TSS/Infrastructure Operations
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Tony Earnshaw
2004-01-25 12:21:51 UTC
Permalink
Post by Loren M. Lang
Post by Peter Marschall
Objectclass person does not allow the attribute dc.
But why does it complain about it missing when I don't include it?
Because you are not adding a person, you are adding a dcObject

dn: dc=tallye,dc=com
objectClass: top
objectClass: dcObject
dc: tallye

See also Jim's and Quanah's posts, as they complement the above,
especially for Openldap 2.1.

--Tonni
--
mail: billy - at - billy.demon.nl
http://www.billy.demon.nl
Continue reading on narkive:
Loading...