OpenLDAPServer fails to load *.ldif

Asked by rray

Hello Everyone:

   First let me explain I am VERY new to Ubuntu. We have the tool up and running and now were are trying to install OpenLDAP. What I have done is installed a third party tool--lat to help with the loading of information from the ldif file. Additionally, I have attempted to following the instructions from the is site http://help.ubuntu.com/community/OpenLDAPServer.

I am hoping someone in the community has accomplished this task already and could provided some good feedback on the steps that work.....

Thank you for taking to read and respond to my post.

Russ

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openldap2.3 Edit question
Assignee:
No assignee Edit question
Solved by:
rray
Solved:
Last query:
Last reply:
Revision history for this message
Jonathan Clarke (jooooooon) said :
#1

Hi,

Could you tell us a bit more about what goes wrong? Do you have a problem installing OpenLDAP (the slapd package), or loading a LDIF file? Is so, what error messages do you get?

Revision history for this message
Massimo Forti (slackwarelife) said :
#2

To manager the ldap server usig you linux box data you can use migrationtools_x.y.z.deb

to do this open a shell and edit:

$: sudo apt-get install migrationtools

after you are able to use this tool:

migrate_common.ph;
migrate_base.pl;
migrate_passwd.pl;
migrate_group.pl;

Thanks

Revision history for this message
rray (russray-2007) said :
#3

Jonathan:

   What I am doing is working through the example for OpenLDAPServer. I and using the command sudo slapadd -v -d -1 -l init.ldif to load the tree. This is not a complex file.

dn: dc=ubuntu,dc=company_name,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: company_name
dc: ubuntu

dn: ou=people,dc=ubuntu,dc=company_name,dc=com
objectClass: organizationalUnit
ou: people

I am getting this type of error:

<= str2entry(dc=ubuntu,dc=company_name,dc=com) -> 0x812e3f0
oc_check_required entry (dc=ubuntu,dc=company_name,dc=com), objectClass "dcObject"
oc_check_required entry (dc=ubuntu,dc=company_name,dc=com), objectClass "organization"
oc_check_allowed type "objectClass"
oc_check_allowed type "o"
oc_check_allowed type "dc"
oc_check_allowed type "structuralObjectClass"
=> bdb_tool_entry_put( -1, "dc=ubuntu,dc=company_name,dc=com" )
=> bdb_dn2id( "dc=ubuntu,dc=company_name,dc=com" )
<= bdb_dn2id: got id=0x00000001
=> entry_encode(0x00000001): dc=ubuntu,dc=company_name,dc=com
=> bdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30996)
=> bdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
slapadd: could not add entry dn="dc=ubuntu,dc=company_name,dc=com" (line=7): txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
slapadd shutdown: initiated

I hope this explains better what is happening........

Russ

Revision history for this message
rray (russray-2007) said :
#4

Massimo:

   Sorry, I did not follow you. I understand getting the system to update itself by picking up the migration tools, but running the individual scripts I am not sure.... can u explain more? I am really new to ubuntu.

Russ

Revision history for this message
Best rray (russray-2007) said :
#5

okay, I figured it out...........

My problem was the *.ldif file was adding a root node and it already existed. When I commented out the root and added the organizational units everything worked!

Thanks for everyone's comments..........

Russ