Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Inappropriate authentication #100

Open
jonaskellens opened this issue May 23, 2017 · 1 comment
Open

Error: Inappropriate authentication #100

jonaskellens opened this issue May 23, 2017 · 1 comment

Comments

@jonaskellens
Copy link

Hello

trying to perform a lookup, but always getting authentication issue because it seems the ldap-client is not using the given authentication params (binddn & password).

var LDAPSERVER = new LDAP({
uri: 'ldap://ip.ad.dre.ss',
connect: function() {
this.bind({
binddn: 'cn=A333333,ou=333333,dc=mydomain',
password: 'supersecret'
}, function(err) {
console.log('1.Error = '+err);
});
}
}, function(err) {
getCurrentTime();
console.log('2.Error = '+err);
//Search
var search_options = {
base: 'dc=333333,dc=mydomain',
filter: '(&(telephoneNumber=123456789)(sn=*))',
scope: LDAP.SUBTREE,
attrs: 'cn',
};

LDAPSERVER.search(search_options, function(err, LDAPreturndata){
   if (err) {
      throw new Error('LDAP Search error : '+err);
   } else {
      console.log("LDAP Search result:" + JSON.stringify(LDAPreturndata));
   }
});

});

On openLDAP-server :

May 23 15:16:35 slap01 slapd[7428]: conn=4099 fd=18 ACCEPT from IP=ip.ad.dre.ss:49658 (IP=0.0.0.0:389)
May 23 15:16:35 slap01 slapd[7428]: conn=4099 op=0 BIND dn="" method=128
May 23 15:16:35 slap01 slapd[7428]: conn=4099 op=0 RESULT tag=97 err=48 text=anonymous bind disallowed

May 23 15:16:35 slap01 slapd[7428]: conn=4099 op=1 SRCH base="dc=333333,dc=mydomain" scope=2 deref=0 filter="(&(telephoneNumber=123456789)(sn=*))"
May 23 15:16:35 slap01 slapd[7428]: conn=4099 op=1 SRCH attr=cn
May 23 15:16:35 slap01 slapd[7428]: conn=4099 op=1 SEARCH RESULT tag=101 err=53 nentries=0 text=authentication required

Script output :

1.Error = LDAPError: Success
2.Error = Error: Inappropriate authentication
filter = (&(telephoneNumber=123456789)(sn=*))
/var/socketio/vcserver.js:227
throw new Error('LDAP Search error : '+err);
^
Error: LDAP Search error : Error: Server is unwilling to perform
at Object. (/var/socketio/vcserver.js:227:45)
at LDAP.dequeue (/var/socketio/node_modules/ldap-client/index.js:225:26)

@Marangal
Copy link

Hi can you contact me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants