[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ldap_add() return LDAP_UNWILLING_TO_PERFORM
Hello,
I am a new bie to ldap. Now I am trying to add a user to Windows 2003 active
directory by using ldap api. After I call ldap_add() and set an attribute
"userAccountControl", the function return an error as LDAP_UNWILLING_TO_PERFORM.
Does anyone know why? Does the active directory has some limitations on the
user attribute? Here is what I did:
char *acc_control[] = { "512", NULL }; //trying to enable the user account.
AccControl.mod_op = LDAP_MOD_ADD;
AccControl.mod_type = "userAccountControl";
AccControl.mod_values = acc_control;
// Build the array of attributes.
LDAPMod *NewEntry[10];
NewEntry[0] = &Name;
...
NewEntry[9] = &AccControl;
NewEntry[10] = NULL;
//syncronous call
ret=ldap_add_s( ld, entry_dn, NewEntry);
The error details is: error=0000052D: SvcErr:DSID-031A0FBC, problem 5003
(WILL_NOT_PERFORM) data 0
Thanks a lot.
Sincerely, Howard