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

Trouble with ldapadd



Hi,

I've successfully installed OpenLDAP, got it running, add customised schema, and
had slapd start fine with the schema I've added.

At the begining, I've put LDAP Public Key schema via include directive in
slapd.conf. The content of this schema is:

attributetype ( 1.3.6.1.4.1.22054.1.1.1.13 NAME 'sshPublicKey'
	DESC 'MANDATORY: OpenSSH Public key'
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )

# printableString SYNTAX yes|no
objectclass ( 1.3.6.1.4.1.22054.500.1.1.2.0 NAME 'ldapPublicKey' SUP top
AUXILIARY
	DESC 'MANDATORY: OpenSSH LPK objectclass'
	MUST ( sshPublicKey $ uid )
	)

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 "uid=test,ou=users,dc=orange,dc=com"
ldap_add: No such object
        additional info: parent does not exist

ldif_record() = 32

the content of the users.ldif is

dn: uid=test,ou=users,dc=Mydomain,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: posixAccount
objectClass: ldapPublicKey
description: test Account
cn: test user
sn: test user
uid: test
uidNumber: 1034
gidNumber: 1
homeDirectory: /users/test
sshPublicKey: ssh-dss AAAAB3NzaC1kc3MAAAEBAOvL8pREUg9wSy/8+hQJ54YF3AXkB0OZrXB

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


I'm confused. help or direction would be greatly appreciated.

zyacoubi