leenooks / phpLDAPadmin

phpLDAPadmin - Web based LDAP administration tool
www.phpldapadmin.org
GNU General Public License v2.0
523 stars 166 forks source link

Could NOT login if OpenLDAP-Server disallow anonymous_bind and login auth_type is session or cookie. #175

Closed tachtler closed 1 year ago

tachtler commented 1 year ago

Hi,

if I use the following config.php:

$servers->setValue('login','auth_type','session');
$servers->setValue('login','bind_id','cn=Manager,dc=tachtler,dc=net');

NO anonymous bind could be performed, because the BIND DN from the formular was NOT used! See:

image

BUT when the config.php was set up as follows:

$servers->setValue('login','auth_type','config');
$servers->setValue('login','bind_id','cn=Manager,dc=tachtler,dc=net');
$servers->setValue('login','bind_pass','secret');

an automatic login with anonymous bind was done to test if the anonymous bind works in general!

Please, could you confirm that and help to solve the problem?

Thank you in advance! Klaus.


Here my complete config file, without comment lines:

<?php
$config->custom->session['blowfish'] = '76agsdhgfasdfahsgdfatsdgfahsgdfhagskjdgh';
$config->custom->appearance['friendly_attrs'] = array(
        'facsimileTelephoneNumber' => 'Fax',
        'gid'                      => 'Group',
        'mail'                     => 'Email',
        'telephoneNumber'          => 'Telephone',
        'uid'                      => 'User Name',                                                                    
        'userPassword'             => 'Password'
);
$servers = new Datastore();
$servers->newServer('ldap_pla');
$servers->setValue('server','name','My LDAP Server');
$servers->setValue('login','auth_type','session');
$servers->setValue('login','bind_id','cn=Manager,dc=tachtler,dc=net');
$config->custom->session['reCAPTCHA-enable'] = false;
$config->custom->session['reCAPTCHA-key-site'] = '<put-here-key-site>';                                               
$config->custom->session['reCAPTCHA-key-server'] = '<put-here-key-server>';
?>
tachtler commented 1 year ago

The solution for this was the solution in issue #170