diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 9f3dcb5654..0245a1c2ab 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -587,7 +587,7 @@ function ldap_backed($username, $passwd) { return $status; } - if (!($res = @ldap_bind($ldap, $ldapsearchbase, $passwd))) { + if (!($res = @ldap_bind($ldap, $username, $passwd))) { log_error("ERROR! LDAP could not bind to {$ldapserver} - {$dn}. Defaulting to built-in htpasswd_backed()"); $status = htpasswd_backed($username, $passwd); return $status; diff --git a/usr/local/www/system_usermanager_settings.php b/usr/local/www/system_usermanager_settings.php index e5087ecfa4..76ef0d10bf 100755 --- a/usr/local/www/system_usermanager_settings.php +++ b/usr/local/www/system_usermanager_settings.php @@ -35,7 +35,7 @@ $pconfig['backend'] = &$config['system']['webgui']['backend']; $pconfig['ldapbindun'] = &$config['system']['webgui']['ldapbindun']; $pconfig['ldapbindpw'] = &$config['system']['webgui']['ldapbindpw']; -$pconfig['ldapfilter'] = &$config['system']['webgui']['ldapfilter']; +//$pconfig['ldapfilter'] = &$config['system']['webgui']['ldapfilter']; $pconfig['ldapsearchbase'] = &$config['system']['webgui']['ldapsearchbase']; // Page title for main admin @@ -94,10 +94,12 @@ if ($_POST) { else unset($pconfig['ldapbindpw']); +/* if($_POST['ldapfilter']) $pconfig['ldapfilter'] = $_POST['ldapfilter']; else unset($pconfig['ldapfilter']); +*/ if($_POST['ldapsearchbase']) $pconfig['ldapsearchbase'] = $_POST['ldapsearchbase']; @@ -150,11 +152,11 @@ if(!$pconfig['backend'])