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

Re: Help: Problem to add ldif entries with ldapadd



Hi,

We have just made a binary (rpm) distribution available of our CDS, based on OpenLDAP 2.2.27, for free download at www.symas.com. That would be an easy way to install the latest 2.2 code. Check the FAQ at www.openldap.org for other options. There were many enhancements since 2.0 and it should be both faster and more reliable.

--
Marty Heyman
Symas Corp.

On Jul 18, 2005, at 2:19 AM, zyacoubi@free.fr wrote:


Hi,

I've successfully installed OpenLDAP (2.0.27-17), got it running, and
had slapd start fine.
But when I try to add the value of attribute by doing:

ldapadd -D "cn=Manager,dc=Mydomain,dc=com" -w secret -f ./ users.ldif -x

I get the following error:

adding new entry "dc=Mydomain,dc=com"
ldap_add: Undefined attribute type
        additional info: dn: attribute type undefined

ldif_record() = 17

The content of the users.ldif is:


dn: dc=Mydomain,dc=com
objectClass: dcObject
objectClass: organization
o: Myorganization
dc: Mydomain
dn: cn=Manager,dc=Mydomain,dc=com
objectClass: organizationalRole
objectClass: simpleSecurityObject
cn: Manager
dn: ou=People,o=Myorganization,dc=Mydomain,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit
dn: uid=test,ou=People,dc=Mydomain,dc=com
objectclass: top
objectclass: person
objectclass: posixAccount
objectclass: ldapPublicKey
description: Test Account
userPassword: xxxfrdsyhFDSEE
cn: test
sn: test user
uid: test
uidNumber: 1034
gidNumber: 1000
homeDirectory: /users/test
sshPublicKey: ssh-dssAAAAB3NzaC1kc3MAAAEBAOvL8pREUg9wSy/8 +hQJ54YF3AXkB0OZrXB



When I add these entries by using slapadd all is OK: i can see the content via
slapcat. But when i try to
do ldapsearch, i've no response (see bellow):


#ldapsearch -b "dc=orange,dc=com" -D "cn=Manager,dc=orange,dc=com" -x -w secret
"(objectClass=*)"


version: 2

#
# filter: (objectClass=*)
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1



Even though my slapd.conf file contains the following :

include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema
include         /etc/openldap/schema/redhat/autofs.schema
include         /etc/openldap/schema/redhat/kerberosobject.schema
# schema for ssh public key authetication
include         /etc/openldap/schema/redhat/SshPublicKey.schema

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


database        ldbm
suffix          "dc=Mydomain,dc=com"
rootdn          "cn=Manager,dc=Mydomain,dc=com"
rootpw          secret
# Indices to maintain
index   objectClass,uid,uidNumber,gidNumber,memberUid   eq
index   cn,mail,surname,givenname                       eq,subinitial


Thanks for your help