+ Post New Thread
Results 1 to 12 of 12
Web Development Thread, MRBS Unknown User in Coding and Web Development; Hi Guys, I have just installed the most recent version of mrbs and it works well in fact really well. ...
  1. #1

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0

    MRBS Unknown User

    Hi Guys,

    I have just installed the most recent version of mrbs and it works well in fact really well.

    I have come across a slight snag! well more a hole in my knowledge base, ldap!

    I am trying to get mrbs to authenticate users against Active directory and it seems to fail whichever setting I put in ? does anyone one have an example of their working config.ini.php file? who may be using ldap? I have been browsing multiple threads and I just dont get it

    any help would be very much appreciated.

  2. #2

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    here is the ldap portion of my config.inc.php most likely wrong

    $ldap_host = "12.404.238.2";
    $ldap_v3 = true;
    $ldap_tls = false;
    $ldap_base_dn = "ou=Accounts,dc=chinham,dc=county,dc=sch,dc=uk,dc= local,";
    $ldap_base_dn = "ou=pupils,dc=chinham,dc=county,dc=sch,dc=uk,dc=lo cal,";
    $ldap_user_attrib = "sAMAccountName";
    $ldap_get_user_email = FALSE;
    $ldap_email_attrib = 'mail';
    $ldap_group_member_attrib = 'memberof';
    $ldap_unbind_between_attempts = FALSE;
    $ldap_debug = TRUE;
    ?>

  3. #3

    Danp's Avatar
    Join Date
    Jul 2011
    Posts
    1,446
    Thank Post
    78
    Thanked 168 Times in 148 Posts
    Rep Power
    147
    I gave up with this and setup users just for this! So, if you do get it working I would love to know the details.

  4. #4


    Join Date
    May 2009
    Posts
    3,111
    Thank Post
    271
    Thanked 829 Times in 622 Posts
    Rep Power
    330
    The ldap part of our config looks like :

    Code:
    $auth["session"] = "php";
    $auth["type"] = "ldap";
    
    $ldap_host = "192.168.9.100";
    $ldap_port = 389;
    $ldap_v3 = true;
    $ldap_tls = false;
    
    $ldap_base_dn[] = "ou=Support Staff, dc=ourschool, dc=org, dc=uk";
    $ldap_base_dn[] = "ou=Teaching Staff, dc=ourschool, dc=org, dc=uk";
    
    $ldap_user_attrib = "sAMAccountName";
    $ldap_dn_search_dn = "cn=LDAPQ,cn=Users,dc=ourschool, dc=org, dc=uk";
    $ldap_dn_search_attrib = "sAMAccountName";
    $ldap_dn_search_password = "*******";
    We have the user LDAPQ set up with permissions to query AD.

  5. #5

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    So I need to setup a user with permission to read AD and basically add in

    $ldap_user_attrib = "sAMAccountName";
    $ldap_dn_search_dn = "cn=LDAPQ,cn=Users,dc=ourschool, dc=org, dc=uk";
    $ldap_dn_search_attrib = "sAMAccountName";
    $ldap_dn_search_password = "*******";

    but with my details?

  6. #6


    Join Date
    May 2009
    Posts
    3,111
    Thank Post
    271
    Thanked 829 Times in 622 Posts
    Rep Power
    330
    Possibly. Your AD may be set up to accept anonymous queries in which case you don't (shouldn't) need a user to do that. Your $ldap_base_dn looks a little odd to me.

    $ldap_base_dn = "ou=Accounts,dc=chinham,dc=county,dc=sch,dc=uk ,dc= local,";
    $ldap_base_dn = "ou=pupils,dc=chinham,dc=county,dc=sch,dc=uk,d c=lo cal,";

    The dc=local in the first line there is a space before local, in the second after the o. I'm sure the spaces are incorrect but do you even need the local?

  7. #7

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Corrected my mistakes and still no avail! tried with and without .local
    unable to get it going by adding in admin account to search AD aswell
    hmm at a loss here and dont fancy exporting the contents of AD to add in manually that will be a long day! lol

  8. #8


    Join Date
    May 2009
    Posts
    3,111
    Thank Post
    271
    Thanked 829 Times in 622 Posts
    Rep Power
    330
    Is this a windows or linux server? Do you have the correct php extensions installed?

    I do remember it being a pain to get it working.

  9. #9

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Ah yes my setup might help.

    So currently installed on a windows 7 machine using xampp (apache & mysql) and the AD is on a server 2003 machine
    I have uncommented the ldap line in php.ini as this was throwing up an error.

    Not sure if there is anything else I should have running. first time using xampp as usually would use IIS but could not get mrbs to work properly (have Stopped all IIS services running)

  10. #10


    Join Date
    May 2009
    Posts
    3,111
    Thank Post
    271
    Thanked 829 Times in 622 Posts
    Rep Power
    330
    Do you have the php_ldap library installed? (is about the last thing I can think of)? I'm presuming the xampp build had ldap support compiled in - but I'm afraid I use linux for that sort of thing, so no expertise on your platform.

  11. Thanks to pcstru from:

    ITTony (28th April 2014)

  12. #11

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    So I went over a handful of things and came across a post in regards to 3 .dll files that need to be copied from xampp folder to windows/system

    From C:\xampp\php copy the following files to C:\Windows\system.

    • libeay32.dll
    • libsasl.dll
    • ssleay32.dll

    I had already uncommented the ldap line in php.ini so no need to do that part.

    Restarted xampp and.... nothing lol!
    Im just going to go over my changes and do them again in case one of them was actually working and I was just missing those 3 files.

    Wish me luck

    Thanks for you help pcstru i'll keep you all posted.

  13. #12

    Join Date
    Dec 2013
    Posts
    26
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Ok so finally got this to work so anyone else having difficulties these are the steps I used to get this working :

    If using xampp in windows-

    Firstly enable the ldap module for php-

    To enable php ldap module in XAMPP, find the following files and copy them.
    From C:\xampp\php copy the following files to C:\Windows\system.

    • libeay32.dll
    • libsasl.dll
    • ssleay32.dll


    Find and edit C:\xampp\php\php.ini and uncomment “extension=php_ldap.dll” around line 965

    And then copy the ldap settings from systemdefaults.inc.php into config.inc.php

    And then edit as nessecary
    PHP Code:
    $auth["type"] = "ldap"
    $ldap_host "servername.schoolname.county.co.uk.local";
    $ldap_port 389;
    $ldap_v3 true;
    $ldap_tls false;
    $ldap_base_dn "ou=users,dc=servername,dc=county,dc=co,dc=uk,dc=local";
    $ldap_user_attrib "sAMAccountName";
    $ldap_dn_search_attrib "sAMAccountName";
    $ldap_dn_search_dn "CN=User Name,OU=users,OU=admins,DC=schoolname,DC=county,DC=co,DC=uk,DC=local";
    $ldap_dn_search_password "password";
    $ldap_get_user_email FALSE;
    $ldap_email_attrib 'mail';
    $ldap_group_member_attrib 'memberof';
    $ldap_unbind_between_attempts FALSE;
    $ldap_debug FALSE;

    //---end--- 
    It turns out I needed to add .local on the end and also needed to authenticate with a user to search AD
    the $ldap_dn_search_dn line was wrong I had not included all the OU paths of the tree for that specific user.
    I used Softerra LDAP Administrator 2014.1 to get the correct search_dn name for the account to authenticate with, to search AD

    Hope this helps someone else
    Thanks for your help

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 3
    Last Post: 4th December 2012, 08:07 AM
  2. MRBS Unknown User LDAP Error
    By atnetsolutions in forum Network and Classroom Management
    Replies: 4
    Last Post: 4th October 2012, 04:04 PM
  3. MRBS - Use user type to assign booking type.
    By vicwind in forum Scripts
    Replies: 1
    Last Post: 1st November 2011, 02:17 PM
  4. [PHP] Reg: MRBS 1.4.6 with LDAP - Unknown user.
    By kuttyjack in forum Web Development
    Replies: 1
    Last Post: 28th March 2011, 02:16 PM
  5. Replies: 0
    Last Post: 18th February 2011, 02:24 PM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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