OpenLdap不能同时使用inetOrgPerson和residentialPerson

OpenLdap不能同时使用inetOrgPerson和residentialPerson,ldap,schema,openldap,Ldap,Schema,Openldap,是否可以同时使用inetOrgPerson和residentialPerson 我有以下条目要添加到ldap dn: mail=james@email.com,ou=development,dc=company,dc=com objectclass: inetOrgPerson objectclass: residentialPerson cn: James Lin sn: Lin l: the address mail: james@email.com 在slapd.conf中,我包含了以

是否可以同时使用inetOrgPerson和residentialPerson

我有以下条目要添加到ldap

dn: mail=james@email.com,ou=development,dc=company,dc=com
objectclass: inetOrgPerson 
objectclass: residentialPerson
cn: James Lin
sn: Lin
l: the address
mail: james@email.com
在slapd.conf中,我包含了以下模式

include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
当我试图通过slapadd添加条目时,我得到以下错误

additional info: invalid structural object class chain (residentialPerson/inetOrgPerson)

发现这一点,不可能同时拥有这两个类,因为它们在结构上不同,所以我必须选择一个,我认为inetOrgPerson是一个更好的选择。

不可能同时拥有这两个类,因为它们都是结构类,并且都不是从另一个继承的。这类似于Java中的“类”,其中也不允许多重继承。如果其中一个或两个都是辅助的,则可以同时使用它们,这类似于Java接口。

这是因为它们都是结构化的。你误解了。看看我的答案。