Openldap

OpenLDAP ACL 儲存為雜湊?

  • June 2, 2020

有誰知道為什麼當我添加這 3 個 ACL 時,第三個在 olcDatabase={2}hdb.ldif 中表示為隨機字元串?

ACL:

olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=eastlands,dc=net" write
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to * by dn="cn=Manager,dc=server,dc=net" write by * read

slapcat 輸出:

olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=server,dc=net" write
olcAccess: {1}to dn.base="" by * read
olcAccess:: ezJ9dG8gKiBieSBkbj0iY249TWFuYWdlcixkYz1lYXN0bGFuZHMsZGM9bmV0IiB3cml0ZSBieSAqIHJlYWQg

這有點隨機,但真的讓我很煩。

我在 CentOS 7 上執行 openldap-2.4.39-7.el7。

請試試:

echo "your_hash" | openssl enc -d -base64

你會看到雜湊里面有什麼。您可以確認@Sven 所說的內容(很可能是行尾的尾隨空格)。

我做了這個簡單的腳本來做到這一點: https ://github.com/peppelinux/slapd_acl

只需安裝它,pip3 install slapd_acl 如果它們在 b64 中,它將以純文字形式向我們顯示 ACL。它還可以將它們導出到 ldap modify ldif 結構中,以便我們輕鬆修改它們並儘快送出。

引用自:https://serverfault.com/questions/736385