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

OpenLDAP-2.0.7: "ldap_add: No such object" -- PLEASE HELP!!!



Guys, I am new to OpenLDAP, I just started deploying it a day ago. There are
few questions that I need to figure it out to find out why the heck it is
behaving so badly ( or is it my fault).

My goal:  To build a hierarchichal  LDAP directory.
On top I wan to have a company name: "mycompany"
Next level after, company location: "US", "Japan","Germany"
Next level thereafter, Organizational Units: "IT", "SALES",
"ACCOUNTING","MANAGEMENT", "LEGAL","MARKETING"
Next level after, people with emails and phone numbers.

Here is my ldap.conf file:

# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.4.8.6 2000/09/05
17:54:38 kurt Exp $
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.

BASE    dc=mycompany, dc=com, o=mycompany

HOST     127.0.0.1

#URI
PORT    389

#SIZELIMIT      12
#TIMELIMIT      15
#DEREF          never

Here is my slapd.conf file:

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26 17:06:18
kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /opt/ldap/2.0.7/etc/openldap/schema/core.schema
schemacheck     off
# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral       ldap://root.openldap.org

pidfile         /opt/ldap/2.0.7/var/slapd.pid
argsfile        /opt/ldap/2.0.7/var/slapd.args

# Load dynamic backend modules:
# modulepath    /opt/ldap/2.0.7/libexec/openldap
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
suffix          "dc=mycompany, dc=com"
#suffix         "o=MyCompany, c=US"
rootdn          "cn=root, dc=mycompany, dc=com"
#rootdn         "cn=Manager, o=My Organization Name, c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw         secret
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory       /opt/ldap/2.0.7/var/openldap-ldbm
# Indices to maintain
index   objectClass     eq

And finally here is my  ldif file:

dn: dc=mycompany, dc=com
dc: mycompany
o: mycompany
objectclass: organization
objectclass: dcObject

dn: cn=root, dc=mycompany, dc=com
cn: root
sn: root
objectclass: person

I tried to add some organizational units (like above mentioned) but alas, I
am getting  either:

"ldapadd: no attributes to change or add"

Here are the ldif files that I wanted to insert data from:
Using  ldif. I get "ldap_add: No such object" response.

dn: o=mycompany, c=US
o:mycompany
l:new york
objectclass: organization

dn: ou=IT, o=mycompany, c=US
ou: IT objectclass: organizationalunit

dn: ou=ACCOUNTING, o=mycompany, c=US
ou: ACCOUNTING
objectclass: organizationalunit

dn: ou=MANAGEMENT, o=mycompany, c=US
ou: MANAGEMENT
objectclass: organizationalunit

dn: ou=CLIENTS, o=mycompany, c=US
ou: CLIENTS
objectclass: organizationalunit

dn: ou=OFFICE, o=mycompany, c=US
ou: OFFICE
objectclass: organizationalunit

dn: ou=EMPLOYESS, o=mycompany, c=US
ou: EMPLOYEES
objectclass: organizationalunit

dn: cn=Mr.Peepers, ou=Friends, o=mycompany, c=US
cn: Mr.Peepers
sn: mycompany
mail:gwhalen@clickthebutton.com
objectclass: person

dn: cn=Linus Torvalds, ou=Friends, o=mycompany, c=US
cn:Linus Torvalsd
sn: Doe
mail: test@address.com
objectclass: person


Please help me out. I am about to throw my computer out the window!

Thanks a lot.

Alex