LDAP Authentication

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

LDAP Authentication

Post by sivakumar »

Hi All,
I have installed the PHPMY FAQ 2.6.8 version. I have enabled the LDAP Support in the installation page and given all the details for LDAP. Also enabled in Admin Page.

When I login from the index page it calls the LDAP Authentication but giving the following error :roll:

phpMyFAQ warning [2]: ldap_get_values() expects parameter 2 to be resource, boolean given in Ldap.php on line 216

Please help what i am doing wrong ..Is there any configuration i am missing ? or any other ?
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP Authentication

Post by Thorsten »

Hi,

looks like your LDAP mapping ist not correct. Please check the values in config/constants_ldap.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Post by sivakumar »

Hi Thorsten,

Thanks for your reply.. This is my config/constants_ldap.php contents

$PMF_LDAP['ldap_mapping'] = array (
'name' => 'cn',
'username' => 'samAccountName',
'mail' => 'mail');

$PMF_LDAP['ldap_use_domain_prefix'] = false; -------------I have changed this value from true to false .Since my username is not required domain prefix

$PMF_LDAP["ldap_options"] = array (
LDAP_OPT_PROTOCOL_VERSION => 3,
LDAP_OPT_REFERRALS => 0 );
$PMF_LDAP['ldap_use_sasl'] = false;

The following is ldap.php Details

<?php
$PMF_LDAP["ldap_server"] = 'ip of domain controller';
$PMF_LDAP["ldap_port"] = '389';
$PMF_LDAP["ldap_user"] = 'user'; -------------This is my username
$PMF_LDAP["ldap_password"] = 'user's password';---This is my password
$PMF_LDAP["ldap_base"] = 'ou=active,ou=employees,ou=people,o=domain.com;


Please help me. I am new to PHP and LDAP ..
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP Authentication

Post by Thorsten »

Hi,
sivakumar wrote:

Code: Select all

$PMF_LDAP['ldap_mapping'] = array (
    'name'     => 'cn',
    'username' => 'samAccountName',
    'mail'     => 'mail');
are these values correct?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Post by sivakumar »

hi Thorsten,

can you please tell me how to identify whether it is correct or not ?..I am new to LDAP .Please help me...I have not changed anything in PMF_LDAP['ldap_mapping'].
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP Authentication

Post by Thorsten »

Hi,

I don't know how your LDAP is configured... so I cannot help you here. Sorry.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Post by sivakumar »

Hi Thorsten,

You mean from the LDAP server side or my LDAP configuration in the FAQ application,
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Post by sivakumar »

HI Thorsten,

For more information in one our application, we use LDAP authentication by writing following code..'

$ldap_connector=ldap_connect("ldap.domain.com");
$result=ldap_bind($ldap_connector, "uid=".$_SERVER['PHP_AUTH_USER'].",ou=active,ou=employees,ou=people,o=domain.com", $_SERVER['PHP_AUTH_PW'])

$_SERVER['PHP_AUTH_USER'] -- User Name Entered from the front end
$_SERVER['PHP_AUTH_PW'] -- Password Entered from the front end..

From above details can you able to help me..
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Post by sivakumar »

Hi Thorsten,

Thanks for your help ....Finally i got the setup correct ..I need to give the following configuration.

$PMF_LDAP['ldap_mapping'] = array (
'name' => 'cn',
'username' => 'uid',
'mail' => 'mail');

But i have one question..WHen i login using LDAP i am again able to see only the Login screen.. The application will create user access records automatically or not..
Please provide me details..Thanks for your help
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP Authentication

Post by Thorsten »

Hi,

if you login via LDAP, an user account will be created automatically but you have to add the permissions as well in the admin backend.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sivakumar
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Post by sivakumar »

Thanks Very much ..Really wonderful help from your side..
Post Reply