+ Post New Thread
Results 1 to 5 of 5
Web Development Thread, FreeBSD, PHP, Moodle + LDAP in Coding and Web Development; Anyone here managed to succesfully set up Moodle LDAP authentication on a FreeBSD Server? Here's the outline... FreeBSD Server running ...
  1. #1
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    897
    Thank Post
    84
    Thanked 235 Times in 194 Posts
    Rep Power
    83

    FreeBSD, PHP, Moodle + LDAP

    Anyone here managed to succesfully set up Moodle LDAP authentication on a FreeBSD Server?

    Here's the outline...

    FreeBSD Server running cPanel / WHM 11, hosting several websites (both internal and external). Moodle currently uses manual authentication. We want to get it setup so that Moodle authenticates from our MS-AD database running on our Forest Root.

    Problem - what ports do I need to install before I can recompile PHP with LDAP? At the moment it just fails...

    Have found instructions for Linux rpms, but they're useless to me... Can find plenty of instructions for Windows-based servers, but again, useless to me...

  2. #2
    Joedetic's Avatar
    Join Date
    Jan 2006
    Location
    Walsall
    Posts
    1,316
    Thank Post
    6
    Thanked 13 Times in 13 Posts
    Rep Power
    23
    Ports Search any use to you?

    FreeBSD Ports Search

    I would have thought it'd be a good idea to recompile apache with auth_ldap.


    When it fails what errors do you get? (Not the dreaded error code 2!!)

  3. #3

    Join Date
    Jul 2005
    Location
    Rugby
    Posts
    432
    Thank Post
    17
    Thanked 66 Times in 61 Posts
    Rep Power
    36
    I've had it working in the past but i'm rusty with any instrucitons as it was likely 18 months ago.

    You need to get a working samba/winbind implementation(the hardest part) and then moodle plugs into that.

    I'll try and have a look for any notes that i've still got from my setup.

    Edit: Just realised that you don't need winbind, I only used it because I needed it for something else. What error are you getting when compiling php with ldap?



    Matt
    Last edited by saundersmatt; 24th June 2008 at 09:29 PM.

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    183
    Quote Originally Posted by Joedetic View Post
    I would have thought it'd be a good idea to recompile apache with auth_ldap.
    If you want to do the authentication in Apache itself, yes. But in this case it's PHP that needs LDAP.

    If it won't compile in, will it compile in isolation as a module? This is more flexible in any case.

  5. #5
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    897
    Thank Post
    84
    Thanked 235 Times in 194 Posts
    Rep Power
    83
    "Cannot find ldap.h" is the error I receive...

    Now, investigation shows this to usually be caused by lack of openldap-devel on Linux boxes... however, there is no ldap devel in the FreeBSD Ports Tree that I can find...

    The instructions I'm going off are as follows:

    WHM>Software>Install RPM
    - installed openldap
    - installed openldap-servers
    - installed openldap-devel - if it is not installed, you'll get "Cannot find ldap.h" error while recompiling
    - installed openldap-clients - for working from command line

    - edited /home/cpapachebuild/buildapache/buildscript - I added --with-ldap after all instances of configuration
    - run buildscript
    They're the only step-by-steps I could find for the recompile, and they're for Linux. So, replace rpm with equivalent port. Rest is as per the instructions... except for that darn lack of ldap-devel...

    See cPanel Forums (where I got little response).

    Searching for openldap in the wHm ports installer presents me with the following (no devel):

    Code:
    Searching for Ports...
    Click on the path to the port to install it!
    
    Port:	openldap-client-2.3.42
    Path	/usr/ports/net/openldap23-client
    Info:	Open source LDAP client implementation
    Maint:	delphij@FreeBSD.org
    B-deps:	libtool-1.5.26
    R-deps:	
    WWW:	http://www.OpenLDAP.org/
    
    Port:	openldap-sasl-client-2.3.42
    Path	/usr/ports/net/openldap23-sasl-client
    Info:	Open source LDAP client implementation with SASL2 support
    Maint:	delphij@FreeBSD.org
    B-deps:	cyrus-sasl-2.1.22_1 libtool-1.5.26
    R-deps:	cyrus-sasl-2.1.22_1
    WWW:	http://www.OpenLDAP.org/
    
    Port:	openldap-server-2.3.42
    Path	/usr/ports/net/openldap23-server
    Info:	Open source LDAP server implementation
    Maint:	delphij@FreeBSD.org
    B-deps:	db44-4.4.20.4 libltdl-1.5.26 libtool-1.5.26 openldap-client-2.3.42
    R-deps:	db44-4.4.20.4 libltdl-1.5.26 openldap-client-2.3.42
    WWW:	http://www.OpenLDAP.org/
    
    Port:	openldap-client-2.4.10
    Path	/usr/ports/net/openldap24-client
    Info:	Open source LDAP client implementation
    Maint:	delphij@FreeBSD.org
    B-deps:	libtool-1.5.26
    R-deps:	
    WWW:	http://www.OpenLDAP.org/
    
    Port:	openldap-sasl-client-2.4.10
    Path	/usr/ports/net/openldap24-sasl-client
    Info:	Open source LDAP client implementation with SASL2 support
    Maint:	delphij@FreeBSD.org
    B-deps:	cyrus-sasl-2.1.22_1 libtool-1.5.26
    R-deps:	cyrus-sasl-2.1.22_1
    WWW:	http://www.OpenLDAP.org/
    
    Port:	openldap-server-2.4.10
    Path	/usr/ports/net/openldap24-server
    Info:	Open source LDAP server implementation
    Maint:	delphij@FreeBSD.org
    B-deps:	db46-4.6.21.1 libltdl-1.5.26 libtool-1.5.26 openldap-client-2.4.10
    R-deps:	db46-4.6.21.1 libltdl-1.5.26 openldap-client-2.4.10
    WWW:	http://www.OpenLDAP.org/



SHARE:
+ Post New Thread

Similar Threads

  1. moodle ldap default values if not set by AD
    By russdev in forum Virtual Learning Platforms
    Replies: 12
    Last Post: 8th June 2010, 12:46 PM
  2. Moodle LDAP authentication
    By FN-GM in forum Virtual Learning Platforms
    Replies: 10
    Last Post: 25th May 2008, 12:58 PM
  3. Moodle LDAP integration
    By zag in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 13th March 2008, 04:03 PM
  4. Moodle and LDAP
    By GrumbleDook in forum Virtual Learning Platforms
    Replies: 10
    Last Post: 28th March 2007, 05:02 PM
  5. Moodle LDAP Enrolment
    By Mike_R in forum Virtual Learning Platforms
    Replies: 2
    Last Post: 6th December 2006, 03:33 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •