etyp / meteor-accounts-ldap

A Meteor package for logging in and creating users with LDAP credentials
MIT License
39 stars 23 forks source link

Problem with login in AD #1

Closed pwldp closed 8 years ago

pwldp commented 9 years ago

Hi, I use npm active directory module (https://github.com/gheeres/node-activedirectory) and I can authenticate to AD. When I use meteor-accounts-ldap I got an error: "80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 57, v1db1. I use the same url, dn, username and password in both situations.

Whats wrong?

etyp commented 9 years ago

@pwldp can you provide sample code (without credentials) for me to look at?

etyp commented 9 years ago

Also, this hasn't yet been tested against Microsoft AD. I'll try to set up some code examples for it.

pwldp commented 9 years ago

Hi, I use js file created after meteor create PROJEKCTNAM file and my code is:

if (Meteor.isClient) {
  // counter starts at 0
  Session.setDefault('counter', 0);

  Template.hello.helpers({
    counter: function () {
      return Session.get('counter');
    }
  });

  Template.hello.events({
    'click button': function () {
      // increment the counter when button is clicked
      Session.set('counter', Session.get('counter') + 1);
        //--LDAP
        var username = "UUUUUU";
        var password = "PPPPPPP";

        Meteor.loginWithLDAP(username, password, {
        }, function(err) {
        if (err)console.log(err.reason);
        else console.log("Login passed!"); 

        });        
        //--LDAP

    }
  });
}

if (Meteor.isServer) {
  Meteor.startup(function () {
        LDAP_DEFAULTS.url= "ldap://__IP__";
        LDAP_DEFAULTS.dn= "ou=XXX,dc=XXX,dc=XX";
        LDAP_DEFAULTS.defaultDomain = "XXX.XX";
        LDAP_DEFAULTS.createNewUser = true;
  });
}
fehmer commented 9 years ago

Hi @typ90, @pwldp,

i had some troubles integrating accounts-ldap with an AD as well.

I found out that i was only able to bind the user using <domain>/<username>. But for the LDAP search used to gather more information about the user with the searchResultsProfileMapi need to use a ldap query with a filter.

I forked the project and modified it for my needs.

@pwldp if you want to try my patch please give me a feedback

etyp commented 9 years ago

@fehmer I was planning on rewriting a lot of the package to accommodate to how different people have been using it. Would you want to submit a PR and I can close out this issue?

fehmer commented 9 years ago

Hi @typ90,

i've submitted a PR, please have a look, thank you.

fehmer commented 9 years ago

Hi @typ90, thanks for accepting the PR. Can you please increase the version number and release it to atmosphere?

dpdonohue commented 9 years ago

I second @fehmer 's request! Thank you both for your work

etyp commented 8 years ago

New version has been published to atmosphere. Thanks for the work on this @fehmer - sorry for leaving the package unmaintained for so long.

DarkStar1 commented 7 years ago

@pwldp I have the same LDAP error code from an entirely different scenario. Any idea what the hex code 57 means? I can't seem to find any documentation related to that code anywhere.

pwldp commented 7 years ago

@DarkStar1 maybe this will help you: https://community.boomi.com/docs/DOC-3022

DarkStar1 commented 7 years ago

@pwldp No that doesn't help as that's for error code 53. I would like to find an explanation for data code 57 for error code 49.