I am an LDAP newbie.
I am using nodejs's ldapauth and I keep getting 32 - No Such Object.
Here is my code :
var LdapAuth = require('ldapauth');
var ldapOptions = {
"url":"ldap://my-host:389",
"adminDn" : "cn=manager,dc=guycrc,dc=com",
"adminPassword":"secret",
"searchBase":"ou=Engineering",
"searchFilter":"(uid={{username}})"
};
var ldapAuthClient = new LdapAuth( ldapOptions );
ldapAuthClient.authenticate('Dana', 'Dana',
function(err, result) {
if (err) {
console.log(['Error',err.code, err.dn, err.message ]);
} else {
console.log('Credentials valid = ' + result); // true or false
}
}
);
This is my LDAP info - what I think is relevant for the question
dn: cn=Dana,ou=people,dc=guycrc,dc=com
...
cn: Dana Dana
sn: Dana
uid: Dana
userpassword: Dana
ou: Engineering
dn: cn=CompanyA,ou=groups,dc=guycrc,dc=com
...
cn: CompanyA
ou: Groups
member: cn=Dana,ou=people,dc=guycrc,dc=com
Why am I getting No Such Object all the time?