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

Problems with ldapadd



Hello!

I have some problems with adding LDAP structure to LDAP with the ldapadd 
command.
My openldapserver is running and I think, I type the commandsyntax for 
ldapadd right.
The password is acceppted. I think, there is something wrong with the lidf 
files or slapd.conf. When I start my
slapd daemon slapd.conf works for me. I have tried the ldifs with different 
syntax: no result. My system is suse 9.3 pro with the openldap rpms
and samba rpms. I hope my listings are enough, so that someone can help me.
Here are my logs:



Jun 21 00:31:26 amd slapd[6775]: conn=27 fd=11 ACCEPT from 
IP=127.0.0.1:35850 (IP=0.0.0.0:389)
Jun 21 00:31:26 amd slapd[6775]: conn=27 op=0 BIND 
dn="cn=admin,dc=samba,dc=org" method=128
Jun 21 00:31:26 amd slapd[6775]: conn=27 op=0 BIND 
dn="cn=admin,dc=samba,dc=org" mech=SIMPLE ssf=0
Jun 21 00:31:26 amd slapd[6775]: conn=27 op=0 RESULT tag=97 err=0 text=
Jun 21 00:31:26 amd slapd[6775]: conn=27 op=1 ADD dn="dc=samba,dc=org"
Jun 21 00:31:26 amd slapd[6775]: conn=27 op=1 RESULT tag=105 err=64 
text=naming attribute 'dc' is not present in entry
Jun 21 00:31:26 amd slapd[6775]: conn=27 op=2 UNBIND
Jun 21 00:31:26 amd slapd[6775]: conn=27 fd=11 closed


Jun 21 00:30:14 amd slapd[6775]: conn=25 fd=11 ACCEPT from 
IP=127.0.0.1:35848 (IP=0.0.0.0:389)
Jun 21 00:30:14 amd slapd[6775]: conn=25 op=0 BIND 
dn="cn=admin,dc=samba,dc=org" method=128
Jun 21 00:30:14 amd slapd[6775]: conn=25 op=0 BIND 
dn="cn=admin,dc=samba,dc=org" mech=SIMPLE ssf=0
Jun 21 00:30:14 amd slapd[6775]: conn=25 op=0 RESULT tag=97 err=0 text=
Jun 21 00:30:14 amd slapd[6775]: conn=25 op=1 ADD 
dn="cn=admin,dc=samba,dc=org"
Jun 21 00:30:14 amd slapd[6775]: conn=25 op=1 RESULT tag=105 err=65 text=no 
structural object class provided
Jun 21 00:30:14 amd slapd[6775]: conn=25 op=2 UNBIND
Jun 21 00:30:14 amd slapd[6775]: conn=25 fd=11 closed


amd:/etc/openldap # ldapadd -D cn=admin,dc=samba,dc=org -x -W -f\samba.ldif
Enter LDAP Password:
adding new entry "dc=samba,dc=org"
ldap_add: Naming violation (64)
        additional info: naming attribute 'dc' is not present in entry

amd:/etc/openldap # ldapadd -x -D 
cn=admin,dc=samba,dc=org -x -W -fadmin.ldif
Enter LDAP Password:
adding new entry "cn=admin,dc=samba,dc=org"
ldap_add: Object class violation (65)
        additional info: no structural object class provided

My files:

samba.ldif:

dn: dc=samba,dc=org
objectclass: organization
o: samba

admin.ldif:

dn: cn=admin,dc=samba,dc=org
objectclass: posixaccount
cn: admin
uid: admin
uidNumber: 1000
gidNumber: 100
homeDirectory: /home/admin
loginShell: /bin/bash

slapd.conf:

#
# 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/inetorgperson.schema
include           /etc/openldap/schema/rfc2307bis.schema
include           /etc/openldap/schema/yast.schema
include           /etc/openldap/schema/samba.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/modules
# moduleload      back_ldap.la
# moduleload      back_meta.la
# moduleload      back_monitor.la
# moduleload      back_perl.la

# Sample security restrictions
#     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
#       Subschema (sub)entry DSE: allow anyone to read it
#       Other DSEs:
#               Allow self write access to user password
#               Allow anonymous users to authenticate
#               Allow read access to everything else
#       Directives needed to implement policy:
access to dn.base=""
        by * read

access to dn.base="cn=Subschema"
        by * read

access to attr=userPassword,userPKCS12
        by self write
        by * auth

access to attr=shadowLastChange
        by self write
        by * read

access to *
        by * read

# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn.  (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!

#######################################################################
# BDB database definitions
#######################################################################

database    bdb
checkpoint      1024    5
cachesize       10000
suffix            "dc=samba,dc=org"
rootdn            "cn=admin,dc=samba,dc=org"
# 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 and slap tools.
# Mode 700 recommended.
directory   /var/lib/ldap
# Indices to maintain
index objectClass eq

Best regards
Andreas