# Problem with openLdap migration help.

## rek2

Hi guys, I follow the howto in the gentoo site..

everything perfect and great... till I run migration tools 

I do the base the group etc but when I get to migrate the password one I get:

ldapadd -D "cn=root,dc=lan,dc=XXXXXXX,dc=com" -W -f passwd.ldif

Enter LDAP Password:

adding new entry "uid=root,ou=People,dc=lan,dc=XXXXXX,dc=com"

ldap_add: Invalid syntax (21)

        additional info: objectClass: value #6 invalid per syntax

PS: the XXXX are to masq my real domain.

my questions are first what is the (21) the line? and what about the #6?

and why I am getting this error? :-/

Thanks in advance.

----------

## smerf

 *rek2 wrote:*   

> Hi guys, I follow the howto in the gentoo site..
> 
> everything perfect and great... till I run migration tools 
> 
> I do the base the group etc but when I get to migrate the password one I get:
> ...

 

AFAIK 21 is the Invalid syntax error number... could you paste your dn: cn=root entry's objectClass attribute value? (be carefull and do not paste whole object, especially password hash  :Smile:  )

----------

## rek2

ok here it is hope you can help. thanks

dn: uid=xxxx,ou=People,dc=lan,dc=xxxx,dc=com

uid: xxxxx

cn: xxxxx

sn: xxxx

mail: xxxx@xxxxx.com

mailRoutingAddress: xxxxx@mail.xxxxx.com

mailHost: mail.xxxx.com

objectClass: inetLocalMailRecipient

objectClass: person

objectClass: organizationalPerson

objectClass: inetOrgPerson

objectClass: posixAccount

objectClass: top

objectClass: kerberosSecurityObject

objectClass: shadowAccount

userPassword: {crypt}xxxxxxxxxxxxxx

shadowLastChange: 13058

shadowMax: 99999

shadowWarning: 7

krbName: xxxxxx@LAN.XXXXXXXX.COM

uidNumber: 1123

gidNumber: 1506

homeDirectory: /home/XXXXXX

----------

## rek2

nobody have  come across this?

----------

## smerf

I was hoping this would be something else... are you getting this error for root's entry only? are you sure, you have included all schemas you need?

----------

## rek2

hmm well I am followin the instructions of the ldap howto in the gentoo page..

whatever they have there I have...

I download the migration tools  and then I try to import it in to ldap..

then is when I get the error.. but only in the password file..

what I do notes is that the one in the howto from gentoo the list is much shorter I have things that I dont know if I will use..

like Kerberos stuff... why is that there? and in the howto is not showing after they show a migration?

----------

## rek2

hmm forgot.. I didnt post the root one I got the last user from the list and XXXX it.

do you need exacly the root one? Ithough they were all the same right?

----------

## smerf

I asked about root's entry, because I thought that this is where the error occured.

 *Quote:*   

> adding new entry "uid=root,ou=People,dc=lan,dc=XXXXXX,dc=com"
> 
> ldap_add: Invalid syntax (21)
> 
> additional info: objectClass: value #6 invalid per syntax 

 

the Kerberos entry is probably because you have choosen to use extended_shcema and defined default_mail_domain (which afaik requires some additional schemas to be loaded)

----------

## rek2

hmm I do remember adding the mail thing one.. but the extended I think the howto says we must use it..

what are this schemas we need?

thanks again.

----------

## smerf

quoting http://www.gentoo.org/doc/en/ldap-howto.xml#doc_chap3:

 *Quote:*   

> $DEFAULT_BASE = "dc=genfic,dc=com";
> 
> $EXTENDED_SCHEMA = 1;
> 
> # Comment these lines out unless you have a mail schema loaded
> ...

 

I have to mention, that I've never used $DEFAULT_MAIL_DOMAIN... are you sure you need it? maybe this is the problem...

----------

## rek2

I'll try that. and let you know..

Thanks

----------

## rek2

ok that did it.. now I was able to import it..

Thanks!

one more question.. I will want to add samba too later.. I can use the same username and passwords right?

the whole point of using ldap is to use the same database for all services.

Thanks again.

----------

## smerf

I'm just in the middle of similiar job  :Smile:  the only thing I can do is to give you some more or less usefull links:

similiar solution:

http://www.cs.dixie.edu/ldap/about/

obvious:

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

wiki, not complete

http://gentoo-wiki.com/HOWTO_SAMBA-LDAP_Domain_Controller_%28with_Real_Time_antivirus%29

monkeybox, of course

http://www.monkeybox.org.uk/docs/gentoo/samba3.html

----------

## rek2

thanks I'll take a look to them.

Thanks.

----------

## smerf

Good luck  :Very Happy: 

----------

