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

ldapadd problem



hi
    When i  add data to ldap server 2.0.11, i meet a problem.The operation system is openLinux
Here is the slapd.conf
[root@mail openldap]# more slapd.conf
# $OpenLDAP: pkg/ldap/servers/slapd
/slapd.conf,v 1.8.8.6 2001/04/20 23:32:43 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/openldap/etc/openldap/slapd.oc.conf
include /usr/local/openldap/etc/openldap/slapd.at.conf
include /usr/local/openldap/etc/openldap/schema/core.schema
include /usr/local/openldap/etc/openldap/schema/corba.schema
include /usr/local/openldap/etc/openldap/schema/cosine.schema
include /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
include /usr/local/openldap/etc/openldap/schema/java.schema
include /usr/local/openldap/etc/openldap/schema/krb5-kdc.schema
include /usr/local/openldap/etc/openldap/schema/misc.schema
include /usr/local/openldap/etc/openldap/schema/nadf.schema
include /usr/local/openldap/etc/openldap/schema/nis.schema
include /usr/local/openldap/etc/openldap/schema/openldap.schema


# 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         /usr/local/openldap/var/slapd.pid
argsfile        /usr/local/openldap/var/slapd.args

# Load dynamic backend modules:
# modulepath    /usr/local/openldap/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=mail,dc=hollybridge,dc=not"
#suffix         "o=My Organization Name,c=CN"
rootdn          "cn=qmailusers,dc=mail,dc=hollybridge,dc=not"
#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 accessible by the slapd/tools. Mode 700 recommended.
directory       /usr/local/openldap/var/openldap-ldbm
# Indices to maintain
index   objectClass     eq



following the example.ldif

[root@mail bin]# more example.ldif
dn: cn=qmailusers,dc=mail,dc=hollybridge,dc=not
objectClass: top
objectClass: organization
objectClass: dcObject
dc: mail
sn: hollybridge mail users
cn: qmailusers
o: qmailusergroup

dn: uid=yjl,cn=qmailusers,dc=mail,dc=hollybridge,dc=not
objectClass: top
objectClass: person
cn: yin jiangliang
sn: yin
uid:yjl


Then 
[root@mail bin]# ldapadd -x -D "cn=qmailusers,dc=mail,dc=hollybridge,dc=not" -w secret -f example.ldif  -P 2
adding new entry "cn=qmailusers,dc=mail,dc=hollybridge,dc=not "
ldap_add: Object class violation
        additional info: attribute not allowed

ldif_record() = 65

Any ideas? Thanks  for any suggestions.


                                 qqj