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

Re: Newbie LDIF question



Peter Huetmannsberger wrote:


Sorry I forgot one line, you need to have it like this:

dn: dc=itops,dc=com
objectclass: top
objectClass: dcObject
objectclass: organization
o: ITOPS
dc: itops description: itops


... and Patrick Shinpaugh wrote:

I believe your o should match your first dc and that it is case
sensitive hence the "No such object". Try:


dn: dc=itops,dc=com
objectClass: dcObject
objectClass: organization
o: itops
dc: itops
description: ITOPS


Thanks for these suggestions, but I can't get either to work... with Peter's suggestion, I get:
adding new entry "dc=itops,dc=com"
ldap_add: Naming violation (64)
additional info: value of naming attribute 'dc' is not present in entry


With Patrick's suggestion I still get:
adding new entry "dc=itops,dc=com"
ldap_add: No such object (32)

Since all the (presumably) right answers, from here and what I've found on the web, aren't working, could it possibly be something to do with my config?

///// what I assume is the relevant part of ldap.conf ////
SSL true
#
BASE dc=itops,dc=com
ROOTBINDDN cn=Manager,dc=itops,dc=com
BINDDN cn=Manager,dc=itops,dc=com
# Dont forget to put the LDAP Manager password in /etc/ldap.secret
PORT 636

///// what I assume is the relevant part of slapd.conf /////
database        bdb
suffix          "dc=itops,dc=com"
rootdn          "cn=Manager,dc=itops,dc=com"
rootpw      <my_password>
/////

Does that look sensible?

Cheers,

Steve.




On Thu, 15 Sep 2005, Steve Parker wrote:

Thanks for replying, Peter. I think I've tried that combination already, but here goes:

root@ldap1 # /usr/local/bin/ldapadd -c -Y DIGEST-MD5 -U Manager -W -f i.ldif -v
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
SASL/DIGEST-MD5 authentication started
SASL username: Manager
SASL SSF: 128
SASL installing layers
add objectclass:
top
dcObject
organization
add o:
ITOPS
add description:
itops
adding new entry "dc=itops,dc=com"
modify complete
ldap_add: Naming violation (64)
additional info: naming attribute 'dc' is not present in entry


root@ldap1 #

....  Okay then, add a "dc" attribute of "dc: itops" - which gives
adding new entry "dc=itops,dc=com"
ldap_add: No such object (32)

Alright, maybe I need to set the "dc" to "itops.com" to match the "dc=itops,dc=com":
adding new entry "dc=itops,dc=com"
ldap_add: Naming violation (64)
additional info: value of naming attribute 'dc' is not present in entry


Any ideas? I've been banging my head about this for a few days now!

Steve

Peter Huetmannsberger wrote:



This is my first ldif whihc started me off on my ldap directory

dn: dc=virtual-FC3-4, dc=ok-centrum, dc=at
objectClass: top
objectClass: dcObject
objectClass: organization
o: virtual-FC3-4
dc: virtual-FC3-4

so your first ldif should look like:

dn: dc=itops,dc=com
objectclass: top
objectClass: dcObject
objectclass: organization
o: ITOPS
description: itops


Hope this helps

.peter




On Thu, 15 Sep 2005, Steve Parker wrote:

I've installed OpenLDAP, and it's running happily with TLS and SASL, so the next step is to create the hierarchy.
First the organisation (itops.com in this instance), then ou=People,dc=itops,dc=com (and so on for hosts, etc, etc).
I've trawled the web for examples and I'm obviously missing something which must be staring me in the face because nothing works:


root@ldap1 # cat eg1.ldif
dn: dc=itops,dc=com
objectclass: top
objectclass: organization
o: ITOPS
description: itops

root@ldap1 # /usr/local/bin/ldapadd -c -Y DIGEST-MD5 -U Manager -W -f eg1.ldif
Enter LDAP Password:
SASL/DIGEST-MD5 authentication started
SASL username: Manager
SASL SSF: 128
SASL installing layers
adding new entry "dc=itops,dc=com"
ldap_add: Naming violation (64)
additional info: naming attribute 'dc' is not present in entry


root@ldap1 #

Okay, so add a "dc" entry:

root@ldap1 # cat eg2.ldif
dn: dc=itops,dc=com
objectclass: top
objectclass: organization
o: ITOPS
dc: itops
description: itops

root@ldap1 # /usr/local/bin/ldapadd -c -Y DIGEST-MD5 -U Manager -W -f eg2.ldif
Enter LDAP Password:
SASL/DIGEST-MD5 authentication started
SASL username: Manager
SASL SSF: 128
SASL installing layers
adding new entry "dc=itops,dc=com"
ldap_add: Object class violation (65)
additional info: attribute 'dc' not allowed


root@ldap1 #

So it's not allowed??? Okay, add "dcObject" ... this is all trial-and-error, as you can see:

root@ldap1 # cat eg3.ldif
dn: dc=itops,dc=com
objectclass: top
objectclass: dcObject
objectclass: organization
o: ITOPS
dc: itops
description: itops

root@ldap1 # /usr/local/bin/ldapadd -c -Y DIGEST-MD5 -U Manager -W -f eg3.ldif
Enter LDAP Password:
SASL/DIGEST-MD5 authentication started
SASL username: Manager
SASL SSF: 128
SASL installing layers
adding new entry "dc=itops,dc=com"
ldap_add: No such object (32)


What does this "No such object" mean? I could add an object for "com", but it doesn't like that:
root@ldap1 # cat com.ldif
dn: dc=com
objectclass: top
objectclass: dcObject
objectclass: organization
o: com
dc: com
description: com
root@ldap1 # /usr/local/bin/ldapadd -c -Y DIGEST-MD5 -U Manager -W -f com.ldif
Enter LDAP Password:
SASL/DIGEST-MD5 authentication started
SASL username: Manager
SASL SSF: 128
SASL installing layers
adding new entry "dc=com"
ldap_add: Server is unwilling to perform (53)
additional info: no global superior knowledge


root@ldap1 #

There must be a really simple answer to this; can anybody shed some light?

Cheers,

Steve
steve@itops.com