ldapadd 添加没有用户密码的条目

ldapadd adds entries without userPasswords

我有一个从这个 LDIF 导入的 LDAP 数据库:

dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: hdb
olcDbDirectory: /var/lib/ldap-jenkins
olcSuffix: dc=example,dc=com
olcRootDN: cn=admin,dc=example,dc=com
olcRootPW:: e1NTSEF9YmkzUDlFa1ZycDJMb2JDRDZoRmJmNkpLR2xhNWV2Q1doQzBOWmc9PQ==
olcDbIndex: uid eq
olcDbIndex: mail eq
olcDbIndex: entryCSN eq
olcDbIndex: entryUUID eq
olcDbIndex: objectClass eq
olcAccess: to attrs=userPassword,shadowLastChange
  by self write
  by dn="cn=admin,dc=example,dc=com" write
  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" write
  by anonymous auth
  by * none
olcAccess: to *
  by self write
  by dn="cn=admin,dc=example,dc=com" write
  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
  by dn="cn=jenkins,dc=example,dc=com" read
  by * none

我正在尝试使用 # ldapadd -c -Y EXTERNAL -H ldapi:/// -f darth_vader.ldif:

导入此条目
dn: mail=darth.vader@death.star,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: simpleSecurityObject
objectClass: person
cn: Anakin
sn: Skywalker
mail: darth.vader@death.star
userPassword: e1NTSEF9LzVHNXczbUViYnlJaE5CM0RBdGRjS3I3c1hYN085em90d3B3QWc9PQ==

条目已导入,但没有 userPassword。怎么了?

所以,问题是我连接到数据库的方式,而不是导入。我正在使用无权访问 ACL 中指定的 userPassword 属性的 jenkins 用户进行连接。他只是看不到那个属性。

我需要做的是给他添加一些权限:

olcAccess: to attrs=userPassword,shadowLastChange
  by self write
  by dn="cn=admin,dc=example,dc=com" write
  by dn="cn=jenkins,dc=example,dc=com" read
  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" write
  by anonymous auth
  by * none

阅读就足够了,但是,像 authcompare 这样的较低级别可能也可以。