LDAP Authentication

In this board you can talk about general questions about phpMyFAQ

Moderators: jason102178, Florian, Thorsten, JochenS

LDAP Authentication

Postby sivakumar » Tue Sep 28, 2010 3:22 pm

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 ?
sivakumar
 
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Postby Thorsten » Tue Sep 28, 2010 5:40 pm

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
Thorsten
 
Posts: 12974
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq

Re: LDAP Authentication

Postby sivakumar » Wed Sep 29, 2010 7:54 am

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 ..
sivakumar
 
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Postby Thorsten » Wed Sep 29, 2010 7:56 am

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
Thorsten
 
Posts: 12974
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq

Re: LDAP Authentication

Postby sivakumar » Wed Sep 29, 2010 9:42 am

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'].
sivakumar
 
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Postby Thorsten » Wed Sep 29, 2010 9:43 am

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
Thorsten
 
Posts: 12974
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq

Re: LDAP Authentication

Postby sivakumar » Wed Sep 29, 2010 9:46 am

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

Postby sivakumar » Wed Sep 29, 2010 10:05 am

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

Postby sivakumar » Wed Sep 29, 2010 10:27 am

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
sivakumar
 
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm

Re: LDAP Authentication

Postby Thorsten » Wed Sep 29, 2010 10:32 am

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
Thorsten
 
Posts: 12974
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq

Re: LDAP Authentication

Postby sivakumar » Wed Sep 29, 2010 10:36 am

Thanks Very much ..Really wonderful help from your side..
sivakumar
 
Posts: 19
Joined: Tue Sep 28, 2010 3:04 pm


Return to General discussions

Who is online

Users browsing this forum: Bing [Bot] and 8 guests

cron