Using ldapadd to add new entry - TechRepublic
General discussion
April 27, 2006 at 12:58 AM
sheetalk

Using ldapadd to add new entry

by sheetalk . Updated 15 years, 3 months ago

How do you add a new entry in an ldif file using LDAP? I have tried adding an entry but keeps returning the following error message:

ldap_bind: Invalid credentials (49)

I can perform ldapsearch and it will return results but I can’t add a new entry.

Here is my ldif file for reference:

dn: dc=e2save, dc=com
objectclass: organization
objectclass: dcObject
o: e2save.com
dc: e2save

dn: ou=Marketing, dc=e2save, dc=com
objectclass: organizationalUnit
ou: Marketing

dn: ou=Creative, dc=e2save, dc=com
objectclass: organizationalUnit
ou: Creative

dn: ou=HR, dc=e2save, dc=com
objectclass: organizationalUnit
ou: HR

dn: ou=Customer Services, dc=e2save, dc=com
objectclass: organizationalUnit
ou: Customer Services

dn: cn=Abaid Rehman, ou=Sales, dc=e2save, dc=com
objectclass: add
objectclass: top
objectclass: person
objectclass: inetorgperson
objectclass: organizationalPerson
cn: Abaid Rehman
sn: Rehman
ou: Sales
mail: abaidr@e2save.com
description: Sales

# A leaf node
dn: cn=Andrew Vines, ou=Sales, dc=e2save, dc=com
objectclass: add
objectclass: top
objectclass: person
objectclass: inetorgperson
objectclass: organizationalPerson
cn: Andrew Vines
sn: Vines
ou: Sales
mail: andrewv@e2save.com
description: Sales

This discussion is locked

All Comments