LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-12-2003, 10:27 AM   #1
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Rep: Reputation: 15
adding info to ldap


Hi,

I am getting this error message when I try to add information to the ldap server. Can any one help

adding new entry "dc=mslinux, dc=com"
ldap_add: Object class violation
additional info: unrecognized objectClass 'organzation'

ldif_record() = 65
adding new entry "mail=root@mslinux.com, dc=mslinux, dc=com"
ldap_add: No such object
additional info: parent does not exist

ldif_record() = 32
adding new entry "mail=msingh@mslinux.com, dc=mslinux,dc=com"
ldap_add: No such object
additional info: parent does not exist

ldif_record() = 32


Copy of my sldap.conf file

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/rfc822-MailMember.schema
include /etc/openldap/schema/redhat/autofs.schema
include /etc/openldap/schema/redhat/kerberosobject.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.pid
#argsfile //var/run/slapd.args

# Create a replication log in /var/lib/ldap for use by slurpd.
#replogfile /var/lib/ldap/master-slapd.replog

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

#
# The next two lines allow use of TLS for connections using a dummy test
# certificate, but you should generate a proper certificate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it.
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
#
#
#access to dn="" by * read
#access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default is:
# Allow read by all
#
# rootdn can always write!

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

database ldbm
suffix "dc=mslinux,dc=com"
suffix "o=mslinux,c=UK"
directory /var/lib/ldap
rootdn "cn=root,dc=mslinux,dc=com"
rootdn "cn=root,o=mslinux,c=UK"
 
Old 03-12-2003, 08:37 PM   #2
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Please post your ldif file. Also post the command you use to add the records.

Quote:
additional info: unrecognized objectClass 'organzation'
There appears to be a typo in your ldif file. Check the spelling of "organization".
 
Old 03-13-2003, 03:32 AM   #3
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Original Poster
Rep: Reputation: 15
I have edited my ldif file to this:

dn: dc=mslinux, dc=com
objectclass: dcObject
dc: mslinux.com


dn:dc=mslinux, dc=com
objectclass: inetOrgPerson
cn: root
sn: Nobody
mail: root@mslinux.com

The error message I get now is

ldif_record() = 50
adding new entry "dc=mslinux, dc=com"
ldap_add: Insufficient access

ldif_record() = 50

The command I am using is

ldapadd -x -D "cn=root,dc=mslinux,dc=com" -W -f entries.ldif

Thanks
 
Old 03-13-2003, 06:19 AM   #4
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Okay.

Here are a few changes to the slapd.conf.

Add a password for the rootdn. You can put this line below the line that says "rootdn "cn=root,...

rootpw secret

Comment the second rootdn "cn=root" line. Add a # before it. After we get it to work you can un-comment it and see what happens.

Make sure that the /var/lib/ldap directory exists.


Don't comment out the pidfile and argsfile commands.

Traditionally, we use Manager and not root as the rootdn. Not sure if this will be an issue.

Edit the ldif file as follows:

dn: dc=mslinux,dc=com
objectclass: dcObject
objectclass: organization
o: MS Linux Limited
dc: mslinux.com

dn: cn=root,dc=mslinux,dc=com
objectclass: organizationalRole
cn: root

dn: dc=John Brown,dc=mslinux,dc=com
objectclass: inetOrgPerson
cn: John Brown
gn: John
sn: Brown
mail: jbrown@mslinux.com
telephoneNumber: 876-123-4456


Here are some good ldap links

http://www.openldap.org/doc/admin/quickstart.html

http://www.openldap.org/doc/admin/

http://www.akbkhome.com/helpout/?rr=...kbkhome.com%2F

The one above shows the fields that can be used in each schema. Very, very useful.

http://www.yolinux.com/TUTORIALS/Lin...AP.html#SCHEMA

http://www.openldap.org/faq/data/cache/294.html

http://www.openldap.org/faq/index.cg...tlook&file=293

The last two assist in setting up a directory of names, phone numbers, addresses etc that can be read from Microsoft Outlook.
 
Old 03-13-2003, 06:58 AM   #5
chamkila
Member
 
Registered: Nov 2001
Distribution: Redhat 7.3 Slackware 8.1
Posts: 87

Original Poster
Rep: Reputation: 15
Thanks alot Jamrock, tested and every thing is working fine. Now I can start trying getting ldap to work with samba.

Thanks
 
Old 08-14-2003, 09:12 AM   #6
ranjan
LQ Newbie
 
Registered: Aug 2003
Location: india
Posts: 1

Rep: Reputation: 0
Unhappy ldap_add: Insufficient access

HI
I AM HAVING A PROBLEM WITH MY OPENLDAP SETUP.WHEN I ADD AN LDIF USING-
ldapadd -D "cn=Manager, dc=mycoll, dc=edu" -f mycoll-top.ldif -x
I GET -
adding new entry "dc=mycoll, dc=edu"
ldap_add: Insufficient access

ldif_record() = 50
WHEN I USE -W -
ldapadd -w secret -D "cn=admin, dc=mycoll, dc=edu" -f mycoll-top.ldif -x
I GET -
ldap_bind: Invalid credentials

copy of my slapd.conf is
###########################
database ldbm
suffix "dc=mycoll,dc=edu"
#suffix "o=My Organization Name,c=US"
rootdn "cn=Manager,dc=mycoll,dc=edu"
#rootdn "cn=Manager,o=My Organization Name,c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}kAihLiAAisfMPD1pS5UiNW0u9qNUqkRj
# rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
replogfile /var/lib/ldap/replication.log
directory /var/lib/ldap

#for performance
loglevel 0

# Indices to maintain
index objectClass,uid,sn,uidNumber,gidNumber,memberUid eq
index cn,mail,givenname eq,subinitial
# Replicas to which we should propagate changes
#replica host=ldap-1.example.com:389 tls=yes
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM

#######################################
#access control list
######################################
#prevents users from looking at passwords
access to attr=userpassword,clearpassword,ldappassword
by anonymous auth
by self write
by dn="cn=Manager,dc=mycoll,dc=edu" write
by dn="cn=courier,dc=mycoll,dc=edu" read
by * none

#filters need access to this
access to attr=accountstatus
by dn="cn=courier,dc=mycoll,dc=edu" read
by dn="cn=postfix,dc=mycoll,dc=edu" read

#prevents users from viewing employeenumber
access to attr=employeeNumber
by dn="cn=Manager,dc=mycoll,dc=edu" write
by * none

access to *
by dn="cn=Manager, dc=mycoll, dc=edu" write
by users read
by self write
by * read

#EOF
THE LDIF WHICH I WAS TRYING TO ADD ID

dn: dc=mycoll, dc=edu
#dc=mycoll
objectclass: top
objectclass: organization
o: mycollage
description: top level of directory

dn: ou=people, dc=mycoll, dc=edu
objectclass: top
objectclass: organizationalunit
ou: people
description: people within my college (AKA ADDRESS-BOOK).

dn: ou=mailaccounts, dc=mycoll, dc=edu
objectclass: top
objectclass: organizationalunit
ou: mailaccounts
description: people with mailaccounts at my college.

dn: ou=daemons, dc=mycoll, dc=edu
objectclass: top
objectclass: organizationalunit
ou: daemons
description: daemons that run programs
----------------------------------------------------------------------------------
CAN SOMEONE GUIDE ME OUT OF THIS PROBLEM
RANJAN SIMON
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automount NFS from LDAP info not working klnasveschuk Linux - Networking 2 07-26-2005 01:04 PM
Adding entries to an LDAP address book? [GOD]Anck Linux - Software 1 02-10-2005 09:03 AM
Adding Postfix And LDAP to SUSE 9.0 Pro ombill Linux - Software 2 08-02-2004 04:39 AM
ldap-abook unable to get street name in ldap-entry Jingle Linux - Software 1 06-06-2004 07:13 PM
adding another OS - just info WannaLearnLinux Linux - Newbie 5 01-24-2004 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration