I started clean.
I've followed this tutorial, and everything works fine.
Then I want to import this file, because I am busy with a WebSphere book from Packtpub, and I need to follow along and setting up a LDAP server with these contents:
objectclass: top
objectclass: organization
objectclass:organizationalunit
ou: users
description: generic users branch
objectclass:organizationalunit
ou: groups
description: generic groups branch
objectclass:organizationalunit
ou: roles
description: generic roles branch
cn: wasadmin
uid: wasadmin
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
userpassword: wasadmin
sn: wasadmin
givenname: wasadmin
title: wasadmin
description: WAS Administrator
cn: ldapbind
uid: ldapbind
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
userpassword: ldapbind
sn: ldapbind
givenname: ldapbind
title: ldapbind
description: ldapbind
cn: Bob Jackson
uid: bjackson
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
userpassword: password
sn: Jackson
givenname: Bob
telephonenumber: 123456789
title: WAS Administrator
description: LDAP test user
cn: Mary Smith
uid: msmith
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
userpassword: password
sn: Smith
givenname: Mary
telephonenumber: 123456789
title: WAS Administrator
description: LDAP test user
objectclass: groupofnames
cn: wasadmins
description: WAS Admins
# add the group members all of which are
# assumed to exist under people
But when I want to import, I get this:
[root@CentOS-01 cn=config]# ldapadd -W -D cn=admin,dc=mycompany,dc=org -v -x -f /tmp/mycompanyorg.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
add objectclass:
top
organization
add o:
ldap_add: Server is unwilling to perform (53)
additional info: no global superior knowledge
When I do this:
[root@CentOS-01 cn=config]# ldapsearch -xLLWD cn=admin,dc=mycompany,dc=org -b dc=mycompany,dc=org dn
Enter LDAP Password:
version: 1
No such object (32)
Something tells me it's wrong.
So, a friend who helped me said I had to create the company first, and that I should use dc=company,dc=org instead of o=
company.org.
I had to create the company first in the LDAP he said, so he passed me this file:
# usergroups.ldif
#
#
dn: dc=mycompany,dc=org
dc: company
objectClass: top
objectClass: domain
dn: ou=users,dc=mycompany,dc=org
ou: Users
objectClass: top
objectClass: organizationalUnit
description: Central location for UNIX users
dn: ou=groups,dc=mycompany,dc=org
ou: Groups
objectClass: top
objectClass: organizationalUnit
description: Central location for UNIX groups
# EOF
But I can't add that:
[root@CentOS-01 cn=config]# ldapadd -W -D cn=admin,dc=mycompany,dc=org -v -x -f /tmp/usergroup.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
add dc:
company
add objectClass:
top
domain
adding new entry "dc=mycompany,dc=org"
ldap_add: Naming violation (64)
additional info: value of single-valued naming attribute 'dc' conflicts with value present in entry
I hope I will ever solve this, I can't complete my study now and have wasted hours and hours on this ldap problem.
I hope you can help me out..
Karntol