【问题标题】:Laravel: LDAP-Auth invalid DN syntaxLaravel:LDAP-Auth 无效的 DN 语法
【发布时间】:2013-12-17 08:37:10
【问题描述】:


我正在使用 Laravel 4.0.10ccovey/ldap-auth 进行用户身份验证。在服务器端,我使用Turnkey OpenLDAP 创建了OpenLDAP 服务器。我已按照说明进行操作,但在尝试连接服务器时出现错误。

错误:

Bind to Active Directory failed. Check the login credentials and/or server details. AD said: Invalid DN syntax

我的app/config/adldap.php 文件:

<?php

return array(
    'account_suffix' => '@mreza.vpl',

    'domain_controllers' => array("ldap.vpl.lan"), // An array of domains may be provided for load balancing.

    'base_dn' => 'DC=mreza,DC=vpl',

    'admin_username' => 'admin',

    'admin_password' => 'mypassword',
    'real_primary_group' => true, // Returns the primary group (an educated guess).

    'use_ssl' => false, // If TLS is true this MUST be false.

    'use_tls' => false, // If SSL is true this MUST be false.

    'recursive_groups' => true,
);

我将此行添加到app/config/auth.php

'username' => 'uid'

我的 OpenLDAP 数据库如下所示:
我想针对People 组进行身份验证

任何想法我做错了什么?这几天我一直在尝试设置它。不过,我是 LDAP 的新手。

谢谢!

【问题讨论】:

    标签: php authentication laravel ldap openldap


    【解决方案1】:

    将管理员用户名更改为 cn=Admincn=admin,DC=mreza,DC=vpl 并尝试连接。通常,您需要一个完整的 DN 才能绑定。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-08
      • 2023-02-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多