Authenticating through AD

Issue #131 resolved
Hung Huynh created an issue

we downloaded the virtualbox and configure the config-site.php file as instructed. We have the site running and able to log in as the local admin account. but when we enable ldap authentication, we get a server error code 500. we can't even sign in as the local admin account. see attachment for our ldap config.

thanks,

Comments (16)

  1. Janos SUTO repo owner

    Do you have the php ldap package installed? If not, then please execute apt-get update, then apt-get install php5-ldap, then restart the webserver.

    Btw. it's now a bit older release, I'll make a vmware version (ova file) available next week.

  2. Hung Huynh reporter

    thanks! Now after the update and reboot, i can sign in as admin@local but still can't sign in using an AD account. says invalid email and password.

  3. Janos SUTO repo owner
    • is there anything in the maillog file regarding the login?

    I take that LDAP_HELPER_DN is a correct LDAP DN (please verify in the ADSI Edit utility). A helper account is required for ldap based login to work.

  4. Hung Huynh reporter

    yes, the ldap helper account is correct. i've even use the built-in AD admin account but had no luck. should i be using ldap_sync.php? i read on one issue, you said not to use ldap_sync.

    p.s. this is what's happening in maillog.

    19 Aug 23 20:19:44 piler piler-webui[882]: sphinx query: 'SELECT id FROM main1 WHERE MATCH('@to **X**** Xorg') ORDER BY sent DESC LIMIT 0,1000 OPTION max_matches=1000' in 0.00 s, 0 hits

  5. Janos SUTO repo owner

    Please edit model/user/auth.php, search for private function checkLoginAgainstLDAP(), and make sure it has

    if(isset($query->row['dn']) && $query->row['dn']) {

    and not only

    if(isset($query->row)) {

    I think it will do the trick

  6. Hung Huynh reporter
    • changed status to open

    LDAP isn't working still. here is what i did...

    1. download and load the ova file you provided.
    2. update the resolv.conf file to search our domain and change the ip for the nameserver (dns).
    3. update the hosts file to the ip of piler server and update the dns name
    4. change the interfaces to match the ip of step #3
    5. update timezone
    6. change all the config as instructed for the config-site.php
    7. update server_name in piler.conf to match the server name of config-site.php
    8. add the ldap authentication to the config-ste.php (see original screenshot)

    let me know if i am doing something wrong. thanks.

  7. Hung Huynh reporter

    looking through the mail.log file now, it is saying

    "ldap query, base dn='', filter='(&(objectClass=user) (mail=xxxx@xxxxx.org))', attr='', 0 hits"

  8. Log in to comment