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

Re: ldap_add: Undefined attribute type (17)



Hi Lars
you should put an empty line in the ldif file between two entries:

dn: dc=domain,dc=com
objectclass: dcObject
objectclass: organization
o: MyCompany
dc: domain

dn: cn=Manager,dc=domain,dc=com
objectclass: organizationalRole
cn: Manager

suomi


Lars Holm wrote:

Hi!

I have tried to do the quick start example but it fails with this
printout "ldapadd: update failed: dc=domain,dc=com ldap_add: Undefined
attribute type (17)". I send slapd.conf an my.ldif file and should
appreciate if somebody could tell me what is wrong.

Regards
Lars Holm

ldapadd -v -x -D "cn=Manager,dc=domain,dc=com" -W -f /var/lib/ldap/my.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password: secret


add objectclass: dcObject organization organizationalRole add o: MyCompany add dc: domain add dn: cn=Manager,dc=domain,dc=com add cn: Manager adding new entry "dc=domain,dc=com" ldapadd: update failed: dc=domain,dc=com ldap_add: Undefined attribute type (17) additional info: dn: attribute type undefined

ldap@bellman26c1:~>

home/uablhl> uname -a
Linux bellman26c1.domain.com 2.4.20-4GB #1 Wed Aug 6 18:26:21 UTC 2003 i686 unknown unknown GNU/Linux

cat SUSE-RELEASE
SuSE Linux 8.2 (i586)
VERSION = 8.2



cd /var/lib/ldap
ldap@bellman26c1:~> cat my.ldif
dn: dc=domain,dc=com
objectclass: dcObject
objectclass: organization
o: MyCompany
dc: domain
dn: cn=Manager,dc=domain,dc=com
objectclass: organizationalRole
cn: Manager


bellman26c1:/usr/local/home/uablhl # cat /etc/openldap/slapd.conf # $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.5 2002/11/26 18:26:01 kurt Exp $ # # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/misc.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		/var/run/slapd/slapd.pid
argsfile	/var/run/slapd/slapd.args

# Load dynamic backend modules:
# modulepath	/usr/lib/openldap/openldap
# moduleload	back_bdb.la
# moduleload	back_ldap.la
# moduleload	back_ldbm.la
# moduleload	back_passwd.la
# moduleload	back_shell.la

# Sample security restrictions
#
#   Disallow clear text exchange of passwords
# disallow bind_simple_unprotected
#
#	Require integrity protection (prevent hijacking)
#	Require 112-bit (3DES or better) encryption for updates
#	Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64

# Sample access control policy:
#	Root DSE: allow anyone to read it
#	Other DSEs:
#		Allow self write access
#		Allow authenticated users read access
#		Allow anonymous users to authenticate
#	Directives needed to implement policy:
# access to dn.base="" by * read
# access to *
#	by self write
#	by users read
#	by anonymous auth
#
# if no access controls are present, the default policy is:
#	Allow read by all
#
# rootdn can always write!

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

database ldbm
suffix "dc=domain,dc=com"
rootdn "cn=Manager,dc=domain,dc=com"
# 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 /var/lib/ldap
# Indices to maintain


index objectClass eq
bellman26c1:/usr/local/home/uablhl #