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

Adding more entries to the tree



Hello,

    How do I add more entries to an existing directory?

This is how I proceeded:

1)
    I used ldapadd to create my initial DIT using file data.ldif given
below.

ldapadd -D "cn=Manager,dc=boxhill,dc=com" -W <data.ldif
===================== data.ldif ================================
dn: dc=boxhill, dc=com
dc: boxhill
o: My Company
objectclass: organization
objectclass: dcObject

dn: cn=Manager, dc=boxhill, dc=com
cn: Manager
sn: Manager
objectclass: person

dn: ou=accounts,dc=boxhill,dc=com
objectclass: top
objectclass: organizationalUnit
ou: accounts

dn: cn=admindudes,ou=accounts,dc=boxhill,dc=com
objectclass: top
objectclass: groupOfNames
cn: admindudes
member: uid=xxx,ou=accounts,dc=boxhill,dc=com

dn: uid=xxx,ou=accounts,dc=boxhill,dc=com
objectclass:Person
uid: xxx
cn: Joe
sn: Sabu

============== end of data.ldif =====================================
 My slapd.conf file is:

==================== slapd.conf ===============================
include /usr/local/etc/openldap/slapd.at.conf
include /usr/local/etc/openldap/slapd.oc.conf
schemacheck off

pidfile /usr/local/var/slapd.pid
argsfile /usr/local/var/slapd.args

database ldbm
suffix "dc=boxhill, dc=com"
rootdn "cn=Manager, dc=boxhill, dc=com"
directory /usr/tmp
rootpw {crypt}UhfanGxIMzepM

access to dn="ou=(.*),dc=boxhill,dc=com"
 attrs=children
 by group="cn=admindudes,ou=$1,dc=boxhill,dc=com" write
 by * write

access to dn="(.*),ou=(.*),dc=boxhill,dc=com"
 by group="cn=admindudes,ou=$2,dc=boxhill,dc=com" write
 by * none

============= end of slapd.conf   ==================================

2)
    My next attempt is to add (incrementally) more entries (users) to the
"accounts" subtree using the datafile data1
I tried ldapadd and also a ldapmodify with a changetype:add clause. I tried
binding as both rootdn and as "uid=xxx,ou=accounts,dc=boxhill,dc=com" (a
member of admindudes).

I even removed all acl entries from slpad.conf; Nothing seems to work.
Please advice.

======================== data1 =======================================

dn: uid=user1,ou=accounts,dc=boxhill,dc=com
objectclass:Person
objectclass:account
uid: user1
userpassword: sabu
cn: New
sn: Dude1

==============================================================

Thanks
Joe Sabu