My Base DN is: ou=Users,dc=ourdomain,dc=local  (note that capital U in
Users is correct)
UID mask is: uid=%s

When I try to run this code manually in python

>>> import ldap
>>> ldapo = ldap.initialize('ldap://ourldapserver:389')
>>> ldapo.search_s('ou=Users,dc=pulse,dc=local', 
>>> ldap.SCOPE_ONELEVEL,'uid=mylogin');

I got correct result - array (or whatever) with all my LDAP
attributes.

I just doesn't work on login page. I was wondering if it's not somehow
connected with the fact that in authenticate you create all those
objects and bind it, then call call get_or_create_user and create,
bind the objects again without destroying or unbinding the old one?
That is just my thought, as I mentioned before I'm not familiar with
python :).

Btw. one small suggestion - in the settings form I would change label
"LDAP server" to "LDAP URI" as you are expecting URI not the host
name. It's mentioned in the example but it was also my mistake, I just
put the hostname of our LDAP server there and it of course didn't
work :)

Cheers, Tom

On 17 Lis, 04:36, "Gavin M. Roy" <[EMAIL PROTECTED]> wrote:
> Ah yeah, it's in the field setting initial, I don't know how I missed that
> ;-)
>
> On Sun, Nov 16, 2008 at 10:35 AM, Gavin M. Roy <[EMAIL PROTECTED]> wrote:
>
> > With the patch I submitted, you set your LDAP Base DN, which would be
> > something like ou=users,cn=yourdomain,cn=com
> > and then in the LDAP UID Mask use something like (uid=%s).
>
> > I think the DN is still showing up in the UID Mask for a new install, I
> > need to check that out and submit another patch to clean that up.
>
> > On Sun, Nov 16, 2008 at 3:04 AM, Tomas Friml <[EMAIL PROTECTED]>wrote:
>
> >> Hi David,
>
> >> I'm trying to get reviewboard working with our OpenLDAP server but
> >> without much success so far. I've tried to use this patch before it
> >> was committed and also updated to revision 1573 today. Result is still
> >> the same - according to logs I'm getting LDAP error:  {'info':
> >> 'invalid DN', 'desc': 'Invalid DN syntax'}. I've tried to connect
> >> running the code from backends.py manually and it worked (btw. I'm
> >> completely new to python). Also using some more debug messages I found
> >> out that the authenticate method works normally, it's just the
> >> get_or_create_user (which is called from authenticate) which obviously
> >> doesn't work even if the code is the same. Also I'm quite sure that
> >> the DN base is correct. So I'm quite confused :).
>
> >> Any help appreciated.
>
> >> Cheers,
> >> Tom
>
> >> On 14 Lis, 20:25, "David Trowbridge" <[EMAIL PROTECTED]> wrote:
> >> > FYI, in SVN revision r1573, I've committed the patch fromhttp://
> >> reviews.review-board.org/r/634/
>
> >> > This generalizes the LDAP authentication scheme to work better with
> >> > OpenLDAP. If you're using LDAP authentication, you'll have to update
> >> > your settings:
>
> >> > Your "User Mask" currently looks something like
> >> > "uid=%s,ou=users,dc=example,dc=com"
> >> > You'll now set "User Mask" to "uid=%s" and "LDAP Base DN" to
> >> > "ou=users,dc=example,dc=com"
>
> >> > -David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to