[Date Prev][Date Next] [Chronological] [Thread] [Top]

modify question



In my ldap database I have employeeNumber: 12345
I want to modify the first employee number and  add an additional employee example:
employeeNumber: 12345678
employeeNumber: 103

This is my code:

print O "dn: uid=".$uid.",ou=People,dc=xx,dc=xx\n";
print O "changetype: modify\n";
print O "replace: employeeNumber\n";
print O "employeeNumber: 12345678\n";
print O "employeeNumber: 103\n";
print O "\n";

I receive an error message: ldap_modify: contraint violation
  additionalinfo: employeeNumber: multiple value provided

So, I tried:

print O "dn: uid=".$uid.",ou=People,dc=xx,dc=xx\n";
print O "changetype: add\n";
print O "add: employeeNumber\n";
print O "employeeNumber: 103\n";
print O "\n";

I receive an error message:Type or Value exist
                                        additional info: modify : add values failed

When I am adding a new record for the first time, I can add two values. Why can't I modify a record
and add an additional
value? What I am I doing wrong. I help would be appreciated.
Thanks You
Susan Aurand-Evans