dongzhang3482 2017-02-13 17:06
浏览 80
已采纳

搜索CN时Zend_Ldap中的异常

I am experiencing a weird issue with Zend_Ldap (Zend_Framework 1.12) and PHP 5.6.24 on Windows 2012 R2 when searching for a CN. Basically, I send an LDAP search for the DN:

CN=ABUsers,CN=Users,DC=escenterprise,DC=net

after successfully binding with a valid LDAP user. That is confirmed by this Wireshark trace:

WIRESHARK IMAGE

What I find odd in the trace is that I get a proper response to my search query, which includes the users in the CN I am targeting. However, instead of returning that search result, the PHP LDAP extension (php_ldap.dll, v5.6.24.0) attempts 3 extra binds using the ROOT user for the following CN:

  • CN=Configuration,DN=escenterprise,DN=net
  • CN=DomainDnsZones,DN=escenterprise,DN=net
  • CN=ForestDnsZones,DN=escenterprise,DN=net

Those binds appear to succeed; however the following extra searches for the 3 CN above all fail with the following error message:

0x1 (Operations error; 000004DC: LdapErr: DSID-0C090752, comment:
In order to perform this operation a successful bind must be completed on the
connection., data 0, v2580): searching:
(&(objectclass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=ABUsers,CN=Users,dc=escenterprise,dc=net))

I understand that the 3 CN are contained in the response to my first query. However, I am having some troubles to understand why the 3 extra searches occur in the first place, along with the 3 binds as ROOT.

The issue only happens in one test environment, which is configured the same way of my other test environments where everything works correctly, that is, Zend_Ldap does not return an exception performing the very same search and it does not search the 3 extra CN. If this may help, the test environment where the issue occurs sits in a data center outside of the network where the LDAP server is located and it is connected to it by means of a VPN. The other test environments are in the same building as the LDAP server.

Any idea on why it is happening in that particular environment? How can I avoid it?

Many thanks!

  • 写回答

1条回答 默认 最新

  • dongru3726 2017-02-13 20:52
    关注

    I was experiencing this issue with a test environment that sits in one of my data centers. It turned out to be my PHP Settings was changing optReferrals to TRUE. This worked in the local environments but not for anything that sat outside of my network. After making sure the setting defaulted to FALSE, it worked correctly and I did not see any "ROOT" binds.

    Hope this helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助