FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » ldap user login (debugging the ldap plugin)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
ldap user login [message #162364] Fri, 30 April 2010 20:09 Go to next message
lbrigman124 is currently offline  lbrigman124   United States
Messages: 26
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I have an active directory server that I authenticate to with
another application(jira) running on a linux server.

When I use the same authentication info with the plugin I don't
get logged in.

What do I need to turn on debuging to see where this problem is?


Also, if I make a change to the plugin, when is those changes
picked up by the fudforum application?
Re: ldap user login [message #162366 is a reply to message #162364] Sun, 02 May 2010 15:21 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
The plugin contains echo statements that you can uncomment.

Changes will be picked up immediately.
Re: ldap user login [message #162374 is a reply to message #162366] Mon, 03 May 2010 14:14 Go to previous messageGo to next message
lbrigman124 is currently offline  lbrigman124   United States
Messages: 26
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
The echo's are not commented out. Where does the output go?
It doesn't show up in the fudforums error log or in the web server error log or the web output.
Re: ldap user login [message #162375 is a reply to message #162374] Mon, 03 May 2010 14:35 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
"echo" is a PHP statement that outputs to the web browser. Please read http://php.net/manual/en/function.echo.php

If you don't see the output, you may want to add more echo statements to help you to follow the program flow.
Re: ldap user login [message #162376 is a reply to message #162364] Mon, 03 May 2010 15:22 Go to previous messageGo to next message
lbrigman124 is currently offline  lbrigman124   United States
Messages: 26
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Got it finally. Output at the top before the screen
is refreshed.
Re: ldap user login [message #162380 is a reply to message #162376] Tue, 04 May 2010 12:48 Go to previous messageGo to next message
lbrigman124 is currently offline  lbrigman124   United States
Messages: 26
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I got the plugin working in my environment.
There were a couple of things that had problems that were difficult to find.
1) how to determine what was wrong with the connect?
Solution: enable ldap debugging Code added. Submitted as commented out.
2) Syntax error in code for checking bind failure was wrong.
Solution: Fix syntax error and update the message info.
3) Why does the lookup/search fail?
Solution: Turn Referrals to 0. http://www.mantisbt.org/bugs/view.php?id=7620
This was in the php.net manual but no reasons were given as to why one should use it.
Even the link didn't understand why you need to do this in an Active Directory environment. I
believe I have a clue. If you have more than one site (ie a domain controller per site) then
your search will get referred to the master of the tree which in my case is not the local. It would always
get error #1: Operation failed.


Diffs attached for the fixes.
Diff against $Id: ldap.plugin 4939 2010-04-06 20:14:17Z

Could probably add the debug and referral as options in the
web interface.
  • Attachment: ldap.diff
    (Size: 1.31KB, Downloaded 218 times)
Re: ldap user login [message #162381 is a reply to message #162380] Tue, 04 May 2010 14:22 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Thanks!

Patch was committed: http://sourceforge.net/apps/trac/fudforum/changeset/4952
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: ID For Messages to Move
Next Topic: Can't Log in to Admin
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 12 16:55:59 EST 2017

Total time taken to generate the page: 0.00817 seconds