如何在OpenLDAP中将ACL添加到属性

如何在OpenLDAP中将ACL添加到属性,ldap,Ldap,系统:NethServer-7.6.1810,使用Centos7.6.1810的发行版 OpenLDAP:OpenLDAP-2.4.44-21.el7_6.x86_64 额外套餐:自助密码 我正在使用自助密码和问答方法更改密码。 我将答案存储在一个名为:info的文件中 $answer_objectClass = "extensibleObject"; $answer_attribute = "info"; 最初的帐户提供程序是LDAP,我想用Active Directory替换它。 在我将L

系统:NethServer-7.6.1810,使用Centos7.6.1810的发行版

OpenLDAP:OpenLDAP-2.4.44-21.el7_6.x86_64

额外套餐:自助密码

我正在使用自助密码和问答方法更改密码。 我将答案存储在一个名为:info的文件中

$answer_objectClass = "extensibleObject";
$answer_attribute = "info";
最初的帐户提供程序是LDAP,我想用Active Directory替换它。 在我将LDAP替换为AD作为帐户提供程序之前,所有用户都必须选择一个问题/答案

虽然LDAP仍然是帐户提供程序,但任何具有服务器控制台访问权限的人都可以使用以下命令查看问题/答案:

# ldapsearch  -D cn=libuser,dc=directory,dc=nh -w `cat /var/lib/nethserver/secrets/libuser` -h 127.0.0.1

# toto, People, directory.nh
dn: uid=toto,ou=People,dc=directory,dc=nh
...
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
objectClass: extensibleObject
shadowLastChange: 18220
userPassword:: cm9ibTEyMDQ0OQ==
info: {car}Honda
我创建了一个虚拟机来测试3个用户的场景

在NethServer中,原始帐户提供程序是LDAP

1) 我编写了一个脚本,将用户及其答案提取到file.ldif

2) 我删除LDAP

3) 我安装了Active Directory模块

4) 我将用户/组导入AD。在导入过程中,AD为导入的用户创建新密码

5) 我为广告的自助服务密码添加了一个部分

6) 我用info.ldip修改广告以包含答案

# /usr/bin/systemd-run -M nsdc -q -t /usr/bin/ldbmodify -H /var/lib/samba/private/sam.ldb /var/lib/samba/private/file.ldif

Modified 3 records successfully
#
然后,用户可以修改密码,以响应与LDAP相同的问题/答案。 一切都很顺利

问题: 我无法在LDAP中加密答案,因为当我将用户导入Active Directory时,它无法读取加密的答案。我认为广告是在用另一种方式加密/解密? 如果我没有加密答案,则AD的导入工作正常

虽然仍然使用LDAP作为帐户提供程序,但在我将其更改为Active Directory之前,我想添加一个额外的ACL,以便任何人都无法读取存储在“info”中的答案

在谷歌搜索了很多之后,我找到了一种描述ACL的方法。我希望这是正确的方式

access to attrs=info
    by self write
    by anonymous auth
    by group="cn=domain admins,ou=Groups,dc=directory,dc=nh" write
    by * none
如何创建newacl.ldif文件的内容,以便能够将该ACL添加到OpenLDAP(ldapmodify-Y EXTERNAL-H ldapi://-f/temp/newacl.ldif)

谢谢,

德鲁帕