openldap 和 memberof 属性
我正在尝试使用 LDAP (Zend_Ldap) 并使用 openldap 服务器进行身份验证。 Groups 对象实现两个类:posixGroup 和 top Users 对象实现两个类:inetOrgPerson、posixAccount 和 top。
用户对象没有像“memberof”这样的属性,我可以在其中看到所有用户组。 我可以让用户从组属性“memberuid”中获取组关系,但它不太有用,就像“memverof”属性一样。
我必须为用户对象实现哪些类才能获取 memberof 字段或类似的内容?
I'm trying to make auth with LDAP (Zend_Ldap) and using openldap server.
Groups objects implements two classes: posixGroup and top
Users objects implements two classes: inetOrgPerson, posixAccount and top.
User object has no properties like "memberof", where I can see all user groups.
I can get user to groups relaions from groups propertie "memberuid", but it's not so usable, as in case with "memverof" propety.
Wich classes I must implement for users objects to get memberof field or something similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案确实是“你不想这样做”。您想要将用户添加到组中,而不是相反。您可以使用简单的搜索过滤器找到用户所属的组。
话虽如此,OpenLDAP 中的动态成员资格和动态列表覆盖可以为您做到这一点。但它实际上只是将与上面相同的东西放在幕后。
Well the answer is really 'you don't want to do that'. You want to add the user to the group, not the other way around. You can find the groups the user is a member of with a simple search filter.
Having said that, there are dynamic membership and dynamic lists overlays in OpenLDAP that can do this for you. But it's really just putting the same thing as above under the hood.