[英]Is it possible to make a inetOrgPerson a member of a posixGroup in ldap php using active directory
是否有可能使inetOrgPerson成為posixgroup的成員,而不是在cn內添加手動條目,即時通訊使用php和ldap,但我似乎遇到了這一點:
Modify: Object class violation
碼:
$ldap = ldap_connect("localhost") or die("Unable to connect to server.");
ldap_set_option($ldap,LDAP_OPT_PROTOCOL_VERSION,3);
$dn = "cn=admin,dc=*******,dc=com";
ldap_bind($ldap,$dn,"*****") or die("Unable to connect to server..");
$dn = "cn=********,cn=*********,cn=*********,ou=A*******,dc=********,dc=com";
$entry["cn"] = "MerPaul";
$entry["objectClass"] = "inetOrgPerson";
ldap_mod_add($ldap,$dn,$entry);
我究竟做錯了什么?
LDAP中的objectClass具有可選和必填字段。 inetOrgPerson也不例外。
inetOrgPerson的必填字段是sn
和cn
。
$entry["cn"] = "MerPaul";
$entry["sn"] = "Joe"
$entry["objectClass"] = "inetOrgPerson";
ldap_mod_add($ldap,$dn,$entry);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.