dream12001 2011-02-08 16:54
浏览 40
已采纳

ldap_add错误太模糊了

I am using php-ldap to manage posix accounts on a linux machine. I am able to search the database in php. And I am able to add users via the command line "ldapadd". However, when I try to add a user via PHP ldap_add, I get an "Object class violation" error (errno 65).

I have tried everything I can think of, but the error has not changed. I have even looked to see if there is an alternative to php-ldap, but have not found one.

The problem is when I look up that error in the general LDAP guide, it says "This error is returned with the entry to be added or the entry as modified violates the object class schema rules. Normally additional information is returned the error detailing the violation." And then it lists 8 possible causes.

I need this more in depth error, but cannot find it. ldap_error was also no help. Any ideas how to dig deaper here?

  • 写回答

5条回答 默认 最新

  • dongyange1101 2011-02-10 17:22
    关注

    I figured out how to dig deeper. I am using Ubuntu which was dumping logs to /var/log/{debug,syslog}

    In order to get more info I had to increase the log level to 424 in /etc/ldap/slapd.d/cn=config.ldif

    Then I was able to see the error in the logs which told me what I was doing wrong... using a dc attribute with an inetOrgPerson objectClass.

    Thanks.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示