Laravel:LDAP-Auth无效的DN语法

时间:2013-12-17 08:37:10

标签: php authentication laravel ldap openldap


我使用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数据库如下所示: enter image description here
我想对People群组

进行身份验证

任何想法我做错了什么?我一直在尝试将其设置好几天。我是LDAP的新手。

谢谢!

1 个答案:

答案 0 :(得分:0)

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

相关问题