LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-05-2007, 01:54 AM   #1
aravindhcl
LQ Newbie
 
Registered: Dec 2007
Posts: 8

Rep: Reputation: 0
Ldap error:


when am trying to add LDIF files to the database, am getting this error.


[root@server ~]# ldapadd -x -D "cn=Manager,dc=example,dc=com" \
> -W -f /etc/openldap/example.com.ldif
Enter LDAP Password:
adding new entry "dc=example,dc=com"
ldap_add: Undefined attribute type (17)
additional info: decription: attribute type undefined

I cant able to add the LDIF file.
Totally am having 3 LDIF files,
1)example.com.ldif
2)ldapusers.ldif
3)root.ldif



In my slapd.conf file i have added the slappasswd as below which
i mention in dark letters.Is it correct?
I had just given slappasswd in my prompt and type the new password
and retype password.It automatically encrypt that password.
I copied that password and given in slapd.conf



This is my slapd.conf file.
===========================================

# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################

database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw {SSHA}E3+Pe58NVPdZY1VOePmlvvsjDAkRjnEC
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw secret
# rootpw {crypt}ijFYNcSNctBYg

# 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/example.com

# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub

# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM


database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw {SSHA}E3+Pe58NVPdZY1VOePmlvvsjDAkRjnEC

Last edited by aravindhcl; 12-05-2007 at 03:20 AM. Reason: for refernce
 
Old 12-05-2007, 01:56 AM   #2
aravindhcl
LQ Newbie
 
Registered: Dec 2007
Posts: 8

Original Poster
Rep: Reputation: 0
when i give Ldapsearch command i getting the following error.

[root@server ~]# ldapsearch -x -b 'dc=example,dc=com' '(objectclass=*)'
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope sub
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1
[root@server ~]#
 
Old 12-05-2007, 04:38 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
2 things I've noticed:
Quote:
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw {SSHA}E3+Pe58NVPdZY1VOePmlvvsjDAkRjnEC
Is the above snippet included 2 times in your slapd.conf, or it's just a copy/paste error? It should exists only once.
2nd: There are no schema files included in your slapd.conf. Objectclasses are defined inside the various schema files (usually under /etc/openldap/schema).
Also you didn't post the ldif files you're trying to add, so we can have a better look in your prob.
 
Old 12-05-2007, 05:25 AM   #4
aravindhcl
LQ Newbie
 
Registered: Dec 2007
Posts: 8

Original Poster
Rep: Reputation: 0
the first one was the copying error.

Here is the LDIF file which i try to add.

[root@server openldap]# cat example.com.ldif
dn: dc=example,dc=com
dc: example
description: Root LDAP entry for example.com
objectClass: dcObject
objectClass: organizationalUnit
ou: rootobject

dn: ou=People, dc=example,dc=com
ou: People
description: All people in organisation
objectClass: organizationalUnit
[root@server openldap]#


here is slapd file.
schema file is also there.[root@server openldap]# cat 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/nis.schema

# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2

# 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

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

# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate 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. Your client software
# may balk at self-signed certificates, however.
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem

# 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
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# 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!

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################

database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
#rootpw {SSHA}E3+Pe58NVPdZY1VOePmlvvsjDAkRjnEC
# 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}9+PB01CrKc/w1oCejdgnSIpq+m1Whyfv
# rootpw {crypt}ijFYNcSNctBYg

# 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/example.com

# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub

# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM

it was also copying error.

Last edited by aravindhcl; 12-05-2007 at 05:33 AM. Reason: for reference
 
Old 12-05-2007, 07:51 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Given the example.com.ldif you're trying to import and the error you get:
Quote:
ldap_add: Undefined attribute type (17)
additional info: decription: attribute type undefined
it seems it cannot find the decription attribute (typo?). I cannot see any typo in your ldif file. Perhaps you should look better your ldif for typos, or you can remove the lines with the "description" attribute to see if you can add the ldif into the server.
 
Old 12-05-2007, 08:52 AM   #6
aravindhcl
LQ Newbie
 
Registered: Dec 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Still geting the same error.
 
Old 12-06-2007, 06:42 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
FYI, I've used your slapd.conf and example.com.ldif in my slapd server (version 2.4.6) and everything worked fine.
If I change "description: Root LDAP entry for example.com" to "decription: Root LDAP entry for example.com", then I get the same error as you do. So double-check the ldif, or better yet rewrite it from scratch using vi.
Or you can use slapadd (with slapd server stopped) to add the ldif:
Code:
slapadd -l example.com.ldif

Last edited by bathory; 12-06-2007 at 06:48 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
webmin error (ldap) zoffmann Linux - Server 1 10-08-2007 04:51 AM
LDAP error in postfix dougnc Linux - Software 4 07-19-2007 11:12 AM
LDAP error leiw Linux - General 9 05-13-2007 05:06 AM
Ldap schema error mesh2005 Linux - Networking 0 11-20-2005 04:16 AM
LDAP/passwd error labratmatt Linux - Software 0 01-24-2005 11:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:40 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