openSUSE Forums > Network/Internet » Database Error while adding .ldif data file in LDAP Server

Go Back   openSUSE Forums > Network/Internet
Forums FAQ Members List Search Today's Posts Mark Forums Read


Network/Internet Questions about internet applications, network configuration, usage (SAMBA, network printing, NFS)

Reply
Page 2 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 21-Apr-2009, 13:22
Puzzled Penguin
 
Join Date: Apr 2009
Posts: 44
w8swasi hasn't been rated much yet
Default Re: Database Error while adding .ldif data file in LDAP Serv

the error message is
adding new entry "uid=testuser0,o=bch"
ldap_add: Object class violation (65)
additional info: object class 'inetOrgPerson' requires attribute 'cn'

and my slapd.config file is as follows

#
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/samba3.schema
include /etc/openldap/schema/yast.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_bdb.la
# moduleload back_hdb.la
# moduleload back_ldap.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 attrs=userPassword,userPKCS12
by self write
by * auth

access to attrs=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
suffix "o=bch"
checkpoint 1024 5
cachesize 10000
rootdn "cn=admin,o=bch"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}2g2BSLtUOhPHfZie0VRuOGdRJvbqaUzj
# 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
index sn,cn,uid,uidNumber,gidNumber,member,memberUid eq
Reply With Quote
  #12 (permalink)  
Old 21-Apr-2009, 13:35
Explorer Penguin
 
Join Date: Apr 2009
Posts: 684
ab@novell.com hasn't been rated much yet
Default Re: Database Error while adding .ldif data file in LDAP Server

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Try:

dn: uid=testuser0,o=bch
objectclass: inetorgperson
uid: testuser0
sn: testuser0lname
givenname: testuser0
cn: testuser0

Good luck.





w8swasi wrote:
> the error message is
> ADDING NEW ENTRY \"UID=TESTUSER0,O=BCH\"
> LDAP_ADD: OBJECT CLASS VIOLATION (65)
> ADDITIONAL INFO: OBJECT CLASS 'INETORGPERSON' REQUIRES
> ATTRIBUTE 'CN'
>
> and my slapd.config file is as follows
>
> *#
> 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/samba3.schema
> include /etc/openldap/schema/yast.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_bdb.la
> # moduleload back_hdb.la
> # moduleload back_ldap.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 attrs=userPassword,userPKCS12
> by self write
> by * auth
>
> access to attrs=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
> suffix "o=bch"
> checkpoint 1024 5
> cachesize 10000
> rootdn "cn=admin,o=bch"
> # Cleartext passwords, especially for the rootdn, should
> # be avoid. See slappasswd(8) and slapd.conf(5) for details.
> # Use of strong authentication encouraged.
> rootpw {SSHA}2g2BSLtUOhPHfZie0VRuOGdRJvbqaUzj
> # 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
> index sn,cn,uid,uidNumber,gidNumber,member,memberUid eq*
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJ7hGPAAoJEF+XTK08PnB5MKIQAM50DU5qPl GXkhAS4YCKWm/3
GJdEeKWtHWC796X3nefGbpJCE+pwx/oQVDDsqhhqUzthOS6GgApQfw/kChUEBxnT
xPFPwSu6johG/VgegwaK8SMH1n31lDWA6pnmIIbFpFwe8Nmb8UF1DIoKYD2U3Hi B
4kyhNG1EyrAjj4kbMBT9EZl/J6Y48GJhlEPYfMW9csq/TBBQ50WNGqRXHL/hCLFG
X8nyFcl06OFVz4+9YhDtCCSG7J2tALqqSZwuKPneECbPFkdrFx pMIbaNa0HCJejK
034SbbwmLEmHE+blZaWcaEW0PeFRD0muk2rzfixGRmypiu2JvV +umEIfXEJTcM/r
cKMUNoi6yxCaevJqEk56A6bgS7TLAteQcYyTM6/SaM7FUwm7gUXMSlIFEd11/mET
rmy4HNQTmiJYRySNBvMd3C5ft8BThNVdMFWFT2l1YMOwO4RHt0 ZPlHd5lBaZ4Bc4
mUAFh8H1zl7md3BnNUAqCM4iB1NHMtgY9Sez+GKzCmJrrAgl2F b5KfnY4LnhoogE
+lNNdkTjZf1+zjK94UilYTWoh2FDPYpb/SMAe5mX3OcCUzP0KrJMrbJ/FLpzGnTY
O0YuKlgj87oiVij7yePhZ3u62WUMP7w2uTxQdYhmGSB83Nsrin xzSgkocdMnPZT5
RjBx82/eVP6552hACGHY
=gF4q
-----END PGP SIGNATURE-----
Reply With Quote
  #13 (permalink)  
Old 21-Apr-2009, 13:57
Puzzled Penguin
 
Join Date: Apr 2009
Posts: 44
w8swasi hasn't been rated much yet
Default Re: Database Error while adding .ldif data file in LDAP Serv

Thanks for your help man but it still did not work.
the error message:
adding new entry "uid=testuser0,o=bch"
ldap_add: No such object (32)

i've checked all the files remove all the previously entries. but still errors
the command i've used is
dapadd -D "cn=admin,o=bch" -x -W -f tree.ldif
Reply With Quote
  #14 (permalink)  
Old 21-Apr-2009, 15:35
Puzzled Penguin
 
Join Date: Apr 2009
Posts: 44
w8swasi hasn't been rated much yet
Default Re: Database Error while adding .ldif data file in LDAP Serv

Thanks Alot, i think i got the idea, because i,ve never been this far always stuck at object already present. so i,ll check every thing again and check my ldif file again. i hope it will work now
Reply With Quote
Reply
Page 2 of 2 1 2

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2