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

ldap_modify_ext_s!!!!!!



Hi All,
I have written a LDAP client and when try to modify a entry using
"ldap_modiy_ext()".
I fill up the 'mod' structure with
modM.mod_op = LDAP_MOD_REPLACE;
modM.mod_type = "userPassword";
	vals0[0] = "majeed000";
	vals0[1] = NULL;
modM.mod_values = vals0;


after filling this call :
rc = ldap_modify_ext_s( ld, "cn=puneet, o=magnaquest, c=IN", modS, NULL,
NULL);

EVEN THOUGH I AM SAYING ,"modM.op::REPLACE/DELTE" IT IS APPENDING THIS VALUE
OF PASSWORD TO THE ALREADY EXISTING VALUE OF THE ENTRY..IT IS NOT REPLACING
THE OLD VALUE.

EXAMPLE:
1:THE FOLLOWING WERE THE VALUES OF ENTRIES IN THE DATABASE BEFORE CALLING
THIS FUNCTION
dn:cn=puneet, o=magnaquest, c=IN
objectclass: person
cn:puneet
sn:varma
userPassword:puneet001
2:AFTER CALLING THIS FUNCTION THE ENTRIES IS MODIFIED TO...
dn:cn=puneet, o=magnaquest, c=IN
objectclass: person
cn:puneet
sn:varma
userPassword:puneet001
userPassword::majeed000


HOW CAN I REPLACE THE OLD VALUE,ANY HELP IN THIS REGARDS IS APPRECIATED.
I SHOULD NOT SEE OR GET THIS "puneet001" after wards thru a search
operation.


thanks and regards.

Mohd Majeedullah Khan
Magnaquest Technologies,
Hyderabad,India.
www.magnaquest.com
+91+40-475-0975