LdapRecord Laravel - Active Directory - 看不到任何用户
LdapRecord Laravel - Active Directory - does not see any users
我正在使用 ready package 作为基础,我已经完成 readme.md 文件中的所有步骤并且能够以“einstein”用户身份登录。所以一切似乎都配置正确。
后来我更改了使用 Active Directory 的 ldap 服务器的凭据。
在运行命令时 php artisan ldap:test i receive message that i was able to connect correctly. Laravel logs says the same, but I cannot log in to laravel app. While running the command php artisan ldap:import ldap 收到消息说找不到用户
在日志文件中,我看到类似这样的内容:
[2021-04-28 23:04:08] local.INFO: LDAP (ldap://domain.pl:389) - Operation: Search - Base DN: cn=username@domain.pl,ou=Users,dc=domain,dc=pl - Filter: (&(objectclass=top)(objectclass=person)(objectclass=organizationalperson)(objectclass=inetorgperson)(uid=username)) - Selected: (entryuuid,*) - Time Elapsed: 737.37
有没有人遇到与 ldaprecord 相同的问题,即他能够连接到域但无法对应用程序进行身份验证?并且能够解决这个问题?
更新:我发现 auth.php 使用了错误的用户模型,它使用的是 OpenLdap 而不是活动目录,已更改但结果仍然相同
问题已解决,要使其与 AD 一起使用,您需要:
- 在 auth.php 文件中切换模型到 ActiveDirectory
- 在登录控制器中更改凭据功能必须将 'uid' 键更改为 'sameaccountname'
我正在使用 ready package 作为基础,我已经完成 readme.md 文件中的所有步骤并且能够以“einstein”用户身份登录。所以一切似乎都配置正确。
后来我更改了使用 Active Directory 的 ldap 服务器的凭据。
在运行命令时 php artisan ldap:test i receive message that i was able to connect correctly. Laravel logs says the same, but I cannot log in to laravel app. While running the command php artisan ldap:import ldap 收到消息说找不到用户
在日志文件中,我看到类似这样的内容:
[2021-04-28 23:04:08] local.INFO: LDAP (ldap://domain.pl:389) - Operation: Search - Base DN: cn=username@domain.pl,ou=Users,dc=domain,dc=pl - Filter: (&(objectclass=top)(objectclass=person)(objectclass=organizationalperson)(objectclass=inetorgperson)(uid=username)) - Selected: (entryuuid,*) - Time Elapsed: 737.37
有没有人遇到与 ldaprecord 相同的问题,即他能够连接到域但无法对应用程序进行身份验证?并且能够解决这个问题?
更新:我发现 auth.php 使用了错误的用户模型,它使用的是 OpenLdap 而不是活动目录,已更改但结果仍然相同
问题已解决,要使其与 AD 一起使用,您需要:
- 在 auth.php 文件中切换模型到 ActiveDirectory
- 在登录控制器中更改凭据功能必须将 'uid' 键更改为 'sameaccountname'