jeremycx / node-LDAP

LDAP binding for node.js
MIT License
221 stars 43 forks source link

Unable to modify a registry #112

Open jprivillaso opened 5 years ago

jprivillaso commented 5 years ago

I am trying to modify an item but it does nothing. The only thing that I see it's different is that the dn of my user does not contain cn. Instead, it looks like: uid=123,ou=People,dc=company,dc=org.

After authenticating, I'm using this piece of code:

this.client.modify('uid=123,ou=People,dc=company,dc=org', {
  op: 'add',
  attr: 'parent',
  vals: ['uid=38,ou=People,dc=ecorp,dc=org']
}, (searchError, data) => {
  if (searchError) {
    console.error('Error updating user');
    reject(searchError);
  }
  console.log('User updated successfully in LDAP');
  resolve(data);
});

After executing it, it does resolve the promise successfully, nonetheless it does not add the field that I specified

Do you have any idea of why it could be failing ? Thanks