LDAP authentication requires the python-ldap library, which is not installed

599 views
Skip to first unread message

wasim

unread,
Mar 25, 2010, 6:55:37 PM3/25/10
to reviewboard
Hello Everyone,

I'm new to ReviewBoard, I installed it today. I installed it on
Windows and would like to use LDAP or AD authentication. On the
settings page when I change the authentication method to LDAP I get a
message in red "LDAP authentication requires the python-ldap library,
which is not installed". I think its installed because I ran
"easy_install python-ldap" and it went through without any errors and
I rebooted the server after installing it. I have no Python background
but I have solid background in LDAP, AD, Apache, Windows Server, MS
SQL, Perl and C# if any of that helps. I appreciate the help in
advance.

Thank you,
Wasim

-----
Wasim Kayal
EMC Corporation

Noah Campbell

unread,
Mar 25, 2010, 6:58:06 PM3/25/10
to revie...@googlegroups.com
After the reboot were you successful in starting the service?

> --
> Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to reviewboard...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
>
> To unsubscribe from this group, send email to reviewboard+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>

wasim

unread,
Mar 25, 2010, 7:06:24 PM3/25/10
to reviewboard
The Apache service you mean? If so then yes. The error appears in
ReviewBoard on the general settings page under the LDAP Server box.
The box is grayed out so I can't enter the server address and the the
message is under it. Like below

LDAP Server: [greyed out box would be here]
The LDAP server to authenticate with. For example: ldap://localhost:389

(in red font)LDAP authentication requires the python-ldap library,
which is not installed.

On Mar 25, 5:58 pm, Noah Campbell <noahcampb...@gmail.com> wrote:
> After the reboot were you successful in starting the service?
>

> On Thu, Mar 25, 2010 at 3:55 PM, wasim <wasimka...@gmail.com> wrote:
> > Hello Everyone,
>
> > I'm new to ReviewBoard, I installed it today. I installed it on
> > Windows and would like to use LDAP or AD authentication. On the
> > settings page when I change the authentication method to LDAP I get a
> > message in red "LDAP authentication requires the python-ldap library,
> > which is not installed". I think its installed because I ran
> > "easy_install python-ldap" and it went through without any errors and
> > I rebooted the server after installing it. I have no Python background
> > but I have solid background in LDAP, AD, Apache, Windows Server, MS
> > SQL, Perl and C# if any of that helps. I appreciate the help in
> > advance.
>
> > Thank you,
> > Wasim
>
> > -----
> > Wasim Kayal
> > EMC Corporation
>
> > --

> > Want to help the Review Board project? Donate today athttp://www.reviewboard.org/donate/
> > Happy user? Let us know athttp://www.reviewboard.org/users/


> > -~----------~----~----~----~------~----~------~--~---
> > To unsubscribe from this group, send email to reviewboard...@googlegroups.com

> > For more options, visit this group athttp://groups.google.com/group/reviewboard?hl=en

Noah Campbell

unread,
Mar 25, 2010, 7:24:47 PM3/25/10
to revie...@googlegroups.com
Sometimes using easy_install will install the library for a particular
version of python on your machine. For example if you have 2.5 and
2.6 and the easy_install you used is 2.5, the libraries will be
installed there. When you start RB may be using 2.6, hence the error
message.

I don't have the resources at hand, but you can google how to
determine where easy_install is putting the libraries.

-Noah

> Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/


> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to reviewboard...@googlegroups.com

> For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

wasim

unread,
Mar 26, 2010, 10:01:14 PM3/26/10
to reviewboard
Hi Noah,

Sorry for the late reply. I only have 2.5 on that machine I never
installed python before. I solved the problem! I installed OpenLDAP
2.4.10 then added its bin directory to my path. Which got import ldap
to work but still gave me the same error, so I commented out the
triggering of the error and it worked. In checks.py in the following
lines:

def get_can_enable_ldap():
"""
Checks whether LDAP authentication can be enabled.
"""
try:
imp.find_module("ldap")
return (True, None)
except ImportError:
return (False, _(
'LDAP authentication requires the python-ldap library,
which '
'is not installed.'
))

I just commented out return false and wrote return true and it worked!
I tried with a bogus login and it didn't work which tells me it's not
letting just anyone pass. Thanks for the quick response Noah.

Thank you,
Wasim


On Mar 25, 6:24 pm, Noah Campbell <noahcampb...@gmail.com> wrote:
> Sometimes using easy_install will install the library for a particular
> version of python on your machine.  For example if you have 2.5 and
> 2.6 and the easy_install you used is 2.5, the libraries will be
> installed there.  When you start RB may be using 2.6, hence the error
> message.
>
> I don't have the resources at hand, but you can google how to
> determine where easy_install is putting the libraries.
>
> -Noah
>

Christian Hammond

unread,
Mar 27, 2010, 5:28:22 PM3/27/10
to revie...@googlegroups.com
This is obviously not a real solution we can ship with.

Try instead to replace the 'imp.find_module("ldap")' with 'import ldap'

Sometimes imp.find_module doesn't work, on some installs. This is a Python packaging issue.

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/

-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to reviewboard...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

wasim

unread,
Mar 27, 2010, 11:22:13 PM3/27/10
to reviewboard
Oh, I agree completely. In fact, it wasn't a problem with the code for
this to be a solution it was just a coincidence. I also can't stress
enough a fact in the second sentence of my first post on how this is a
WINDOWS box. Not to mention how I know 0 python and whatever I say
here should be taken with a pound of salt. I will try the replacement
you recommended and let you know. Anyways I really appreciate the
help, you sent me in the right direction.

Thank you very much,
Wasim


On Mar 27, 5:28 pm, Christian Hammond <chip...@chipx86.com> wrote:
> This is obviously not a real solution we can ship with.
>
> Try instead to replace the 'imp.find_module("ldap")' with 'import ldap'
>
> Sometimes imp.find_module doesn't work, on some installs. This is a Python
> packaging issue.
>
> Christian
>
> --

> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.reviewboard.org
> VMware, Inc. -http://www.vmware.com

> > reviewboard...@googlegroups.com<reviewboard%2Bunsu...@googlegroups.com>


> > > >> > For more options, visit this group athttp://
> > groups.google.com/group/reviewboard?hl=en
>

> > > >> > To unsubscribe from this group, send email to reviewboard+


> > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > ME" as the subject.
>
> > > > --
> > > > Want to help the Review Board project? Donate today athttp://
> >www.reviewboard.org/donate/

> > > > Happy user? Let us know athttp://www.reviewboard.org/users/
> > > > -~----------~----~----~----~------~----~------~--~---
> > > > To unsubscribe from this group, send email to

> > reviewboard...@googlegroups.com<reviewboard%2Bunsu...@googlegroups.com>


> > > > For more options, visit this group athttp://
> > groups.google.com/group/reviewboard?hl=en
>

> > > > To unsubscribe from this group, send email to reviewboard+


> > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > ME" as the subject.
>
> > --
> > Want to help the Review Board project? Donate today at
> >http://www.reviewboard.org/donate/

> > Happy user? Let us know athttp://www.reviewboard.org/users/
> > -~----------~----~----~----~------~----~------~--~---
> > To unsubscribe from this group, send email to

> > reviewboard...@googlegroups.com<reviewboard%2Bunsu...@googlegroups.com>


> > For more options, visit this group at
> >http://groups.google.com/group/reviewboard?hl=en
>
> > To unsubscribe from this group, send email to reviewboard+

Reply all
Reply to author
Forward
0 new messages