LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 06-03-2010, 10:51 PM   #1
brucecoad
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Rep: Reputation: 0
OpenLDAP Upgrade problem - invalid value for attributeType


Hi All,

I've been tasked with moving our OpenLDAP from one server to another and in the process to upgrade it from v 1.4 (I think it is) to 2.3.43 running on Red Hat 5.5.

Everything was going fine until I noticed that not all the data was being transferred. Not being not LDAP expert, I tried to load a few objects manually (see below) to see what the problem was and this is what I found.

slapadd -v -c -d -1 -l /tmp/person_info.ldif -f /etc/ldap/slapd.d.conf
db_db_open: dbenv_open(/var/lib/ldap.dev)
=> str2entry: "dn: cn=ucsInetOrgPerson Template Info,cn=Directory Administration,o=The UCS
Company
objectClass: ucsClientTemplateInfo
clearFields: cn
clearFields: sn
includesClasses: ucsInetOrgPerson

"
>>> dnPrettyNormal: <cn=ucsInetOrgPerson Template Info,cn=Directory Administration,o=The UCS Company>
<<< dnPrettyNormal: <cn=ucsInetOrgPerson Template Info,cn=Directory Administration,o=The UCS Company>, <cn=ucsinetorgperson template info,cn=directory administration,o=the ucs company>
str2entry: invalid value for attributeType includesClasses #0 (syntax 1.3.6.1.4.1.1466.115.121.1.38)
slapadd: could not parse entry (line=7)

I'm pretty sure it's a problem with one of the schemas but what exactly I don't know. As you can see we're using our own schema - here is a scaled down extract from the ucsInetOrgPerson schema.

objectclass ( 1.3.6.1.4.8324.2.2.2 NAME 'ucsInetOrgPerson'
SUP inetOrgPerson
MAY ( mailalias $ flags $ prefix $ specialty $ displayComment $
locationCode $ pollNumber $ alternateAddress ) )

attributetype ( 1.3.6.1.5.8324.2.1.28 NAME 'includesClasses'
EQUALITY objectIdentifierMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )

In my slad.conf I'm including the following schemas.

include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/ucs.dev.schema

At this point I'm pretty stuck and any help or pointing in the right direction would be greatly appreciated.

Thanks
Bruce

Last edited by brucecoad; 06-04-2010 at 07:20 PM.
 
Old 06-04-2010, 05:30 PM   #2
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS
Posts: 375

Rep: Reputation: 38
What is on line 7 of person_info.ldif?
 
Old 06-04-2010, 07:22 PM   #3
brucecoad
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for taking the time to have a look.

On line 7 it's only the ". When I copied and pasted the error the formatting got a bit messed up - I've fixed that now. The ldiff file contents are what's in bold.

Bruce
 
Old 06-05-2010, 10:18 PM   #4
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS
Posts: 375

Rep: Reputation: 38
you could try running slapd with -d 256 and see what is happening

For log levels see http://www.bind9.net/manual/openldap...apdconfig.html
 
Old 06-06-2010, 09:17 PM   #5
brucecoad
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks will give it a try on Tuesday and let you know.
 
Old 06-07-2010, 07:57 PM   #6
brucecoad
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Original Poster
Rep: Reputation: 0
This is the message I get when I run it with -d 256.

str2entry: invalid value for attributeType includesClasses #0 (syntax 1.3.6.1.4.1.1466.115.121.1.38)
slapadd: could not parse entry (line=7)

Same as before.

Bruce
 
Old 06-08-2010, 01:29 AM   #7
brucecoad
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Everyone for your help.

So, I've managed to get it working. I don't think what I've done is 100% correct but it's good enough for my application. In case you're also struggling with something similar, this is what I did.

I changed my schema ucs.dev.schema to the following.

attributetype ( 1.3.6.1.5.8324.2.1.28 NAME 'includesClasses'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

I'm pretty sure the EQUALITY match is not correct, but again, it works for what I need it for.

I also changed the following to object classes in the same schema (Note: I added the cn bit).

objectclass (1.3.6.1.4.8324.2.2.7 NAME 'ucsClientForm'
MUST ( cn $ includesClasses ) )

objectclass (1.3.6.1.4.8324.2.2.10 NAME 'ucsClientTemplateInfo'
MUST ( cn $ includesClasses )
MAY ( clearFields ) )

And that's it. If you have something similar I hope this helped because I know how frustrating it can be - good luck.

Bruce
 
  


Reply

Tags
openldap


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
[SOLVED] openldap setup Invalid credentials error (49) vigilandy Linux - Server 9 10-15-2010 10:33 AM
nss_ldap, openldap and openldap-server ... what is openldap for? chakkerz Linux - Server 2 08-13-2009 08:16 PM
LXer: OpenLDAP Quick Tips: Regularly upgrade OpenLDAP! LXer Syndicated Linux News 0 11-25-2008 03:00 PM
ldap_bind: Invalid credentials (49) on OpenLDAP server gergaholic Linux - Server 7 11-08-2007 10:03 AM
ldap_bind: Invalid credentials (49) on OpenLDAP server gergaholic Fedora 2 11-05-2007 04:23 PM


All times are GMT -5. The time now is 09:30 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration