Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yet another LDAP Migrationtools problem.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Klainn
n00b
n00b


Joined: 27 Aug 2004
Posts: 67
Location: Indianapolis

PostPosted: Wed Nov 01, 2006 2:05 am    Post subject: Yet another LDAP Migrationtools problem. Reply with quote

Attempting to run ...

Code:
BLADE tmp # ldapadd -D "cn=Manager,dc=MyDC" -W -f base.ldif
Enter LDAP Password:
adding new entry "cn=Manager,dc=MyDC"
ldap_add: Invalid syntax (21)
        additional info: objectClass: value #1 invalid per syntax


I've searched here and on google and found that this is normally caused by trailing spaces in the ldif file. I've checked the file and there are no trailing spaces to be found.

My slapd.conf
Code:

include         /etc/openldap/schema/misc.schema
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema

password-hash   {smd5}

pidfile         /var/run/openldap/slapd.pid
argsfile        /var/run/openldap/slapd.args

TLSCertificateFile      /etc/ssl/private/ldap.pem
TLSCertificateKeyFile   /etc/openldap/ssl/ldap.pem
TLSCACertificateFile    /etc/ssl/private/ldap.pem

database        ldbm
suffix          "dc=MyDC"
rootdn          "cn=Manager,dc=MyDC"
rootpw          MyPASSWORD
directory       /var/lib/openldap-data

access to *
        by users read
        by anonymous read

access to attrs=userPassword,gecos,description,loginShell
        by self write


My BASE.LDIF

Code:

dn: cn=Manager,dc=MyDC
cn: Manager
objectClass: top
objectClass: container

dn: ou=Hosts,cn=Manager,dc=MyDC
ou: Hosts
objectClass: top
objectClass: organizationalUnit

dn: ou=Rpc,cn=Manager,dc=MyDC
ou: Rpc
objectClass: top
objectClass: organizationalUnit

dn: ou=Services,cn=Manager,dc=MyDC
ou: Services
objectClass: top
objectClass: organizationalUnit

dn: nisMapName=netgroup.byuser,cn=Manager,dc=MyDC
nismapname: netgroup.byuser
objectClass: top
objectClass: nisMap

dn: ou=Mounts,cn=Manager,dc=MyDC
ou: Mounts
objectClass: top
objectClass: organizationalUnit

dn: ou=Networks,cn=Manager,dc=MyDC
ou: Networks
objectClass: top
objectClass: organizationalUnit

dn: ou=People,cn=Manager,dc=MyDC
ou: People
objectClass: top
objectClass: organizationalUnit

dn: ou=Group,cn=Manager,dc=MyDC
ou: Group
objectClass: top
objectClass: organizationalUnit

dn: ou=Netgroup,cn=Manager,dc=MyDC
ou: Netgroup
objectClass: top
objectClass: organizationalUnit

dn: ou=Protocols,cn=Manager,dc=MyDC
ou: Protocols
objectClass: top
objectClass: organizationalUnit

dn: ou=Aliases,cn=Manager,dc=MyDC
ou: Aliases
objectClass: top
objectClass: organizationalUnit

dn: nisMapName=netgroup.byhost,cn=Manager,dc=MyDC
nismapname: netgroup.byhost
objectClass: top
objectClass: nisMap


Anyone see anything obvious that I might need to change?
_________________
Note: This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.
Back to top
View user's profile Send private message
PaveQ
Apprentice
Apprentice


Joined: 11 Feb 2005
Posts: 225
Location: Finland

PostPosted: Wed Nov 01, 2006 5:30 am    Post subject: Reply with quote

Here:

dn: cn=Manager,dc=MyDC
cn: Manager
objectClass: top
objectClass: container

You are trying to use cn=Manager as container for everything and thats wrong. Manager is kinda ldap root user, not a container. Least I think...
_________________
http://blitzkrieg.homelinux.org/
Back to top
View user's profile Send private message
Klainn
n00b
n00b


Joined: 27 Aug 2004
Posts: 67
Location: Indianapolis

PostPosted: Wed Nov 01, 2006 9:12 am    Post subject: Reply with quote

The ldif files are generated via migrationtools.

Good call though, I dumped that out of base.ldif and it all added fine. Now that you've isolated the trouble I do know what caused it and how I can correct if I make the mistake in the future.

Cheers.
_________________
Note: This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum