Hi,

Thanks for the direction given.

I have added logger.info() statements in the LDAP class and found that, my 
python_ldap module installation having problem.
 
  Please add some log statements in the Exception ImportError. Currently 
the statement is 'pass'

Also one more code change I have done in the same file.

After resolving installation problem of python_ldap module, I am getting 
the response of every authentication is "No Such object".

Then  found that, while searching also we need to use the full DN string ( 
uid=user,dc=People,dc=com )  that we used in bind_s() method, I have not 
used anonymous user and password.

The code was looking like following one ( in get_or_create_user )

search_result = ldapo.search_s(settings.LDAP_BASE_DN, ldap.SCOPE_SUBTREE, 
"(%s)" % settings.LDAP_UID_MASK % username)

Now I changed to following one

 userbinding = '%s' % ( settings.LDAP_UID_MASK % username )

 logging.info('LDAP Module: userbinding1: %s ' % (userbinding,))

 search_result = ldapo.search_s('%s,%s' % (userbinding, 
settings.LDAP_BASE_DN),   ldap.SCOPE_SUBTREE, "(%s)" % 
settings.LDAP_UID_MASK % username



There could be some logic defined while writing this code, For my 
convenient I have added this code, Please confirm whether the changes are 
worth to be added in the code base.

OR any other way we can configure it in RB to achieve this.

After the above change, LDAP authentication is working fine for me.


Regards,
Thangappan M 

On Friday, January 4, 2013 3:11:47 AM UTC+5:30, Christian Hammond wrote:
>
> Hi,
>
> If logging is now working, and you're not seeing any logging failures, 
> then we're not hitting any error cases in the logging module. To get more 
> information, you'd have to add your own logging statements, in order to 
> trace where things go wrong. If you feel comfortable at all doing this, you 
> can edit reviewboard/accounts/backends.py, find the appropriate class, and 
> sprinkle logging.info('...') statements in places to try to track it down.
>
> Christian
>
> -- 
> Christian Hammond - chi...@chipx86.com <javascript:>
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
> On Thu, Jan 3, 2013 at 6:30 AM, Thangappan M <thanga...@gmail.com<javascript:>
> > wrote:
>
>>
>>   I missed to enable debug in settings_local.py file.
>>   Now the logging is happening for the repository creation, and raising 
>> review request. but not for the LDAP authentication.
>>
>>   LDAP log in is not working and no error or debug statement is printing 
>> in the log file.
>>   Also checked in the httpd ( error_log, access_log ). There also not 
>> finding any debug statements.
>>
>>    Is there way to know about what is happening behind the screen for 
>> ldap authentication method?
>>
>>
>>
>>
>> On Thursday, January 3, 2013 2:24:19 PM UTC+5:30, Christian Hammond wrote:
>>
>>> Hi,
>>>
>>> Are there any logs at all other than the rotation information in that 
>>> file? Are you certain logging is turned on in settings? Is the log file's 
>>> ownership set to allow the Apache server to write to it?
>>>
>>> Christian 
>>>
>>> -- 
>>> Christian Hammond - chi...@chipx86.com
>>>
>>> Review Board - http://www.reviewboard.org
>>> VMware, Inc. - http://www.vmware.com
>>>
>>>
>>> On Wed, Jan 2, 2013 at 7:19 AM, Thangappan M <thanga...@gmail.com>wrote:
>>>
>>>>   
>>>> Hi Team,
>>>>  
>>>> Installed reviewboard 1.7.1 in my centos 5 machine with Python version 
>>>> 2.7.2 and Django version 1.4.3
>>>> Configured the authentication method as "LDAP"
>>>>  
>>>> Tried log in to the page, it says "invalid user name and password" ( 
>>>> though I am giving correct user name and password )
>>>> To check what goes wrong enabled Logging facility in reviewboard ( also 
>>>> profiling )
>>>>  
>>>> Restarted httpd ( apache) server.
>>>> Tried giving logging credentials. It says Failure again.
>>>>  
>>>> Entered into my review site directory and checked the log 
>>>> file /var/www/reviewboard/**logs/reviewboard.log
>>>>  
>>>> It has nothing about the ldap failure or success.
>>>> The log file content looks like "Rotating logging configurations"
>>>>  
>>>>  
>>>> Please anyone help me where can I see the error logs whenever any 
>>>> failure/success occurs?
>>>>  
>>>>  
>>>>
>>>> -- 
>>>> Want to help the Review Board project? Donate today at 
>>>> http://www.reviewboard.org/**donate/<http://www.reviewboard.org/donate/>
>>>> Happy user? Let us know at 
>>>> http://www.reviewboard.org/**users/<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<http://groups.google.com/group/reviewboard?hl=en>
>>>>  
>>>>  
>>>>
>>>
>>>  -- 
>> 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 <javascript:>
>> For more options, visit this group at 
>> http://groups.google.com/group/reviewboard?hl=en
>>  
>>  
>>
>
>

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Reply via email to