如果不想刪除帳號或是要讓ldap 某個account暫時停用的話
似乎沒有直接的屬性可以使用,想到最單純的方法可能是用ACL來實現了
首先編輯slapd.conf 多加一行include /usr/local/etc/openldap/acl_disabled.conf
vi /usr/local/etc/openldap/slapd.conf
include /usr/local/etc/openldap/acl_disabled.conf
access to *
by * read
access to attrs=userPassword
by self write
by * auth
未來如果有要暫時disable一個帳號的話只需要維護acl_disabled.conf
vi /usr/local/etc/openldap/acl_disabled.conf
access to dn="uid=peter,ou=sales,dc=helloworld,dc=com,dc=xx"
by * none
access to dn="uid=mary,ou=tech,dc=helloworld,dc=com,dc=xx"
by * none
比較麻煩的是..每次編輯完記得重新啟動ldap server才會生效,反正帳號不會常異動啦XDDD
另外就是不適用有replication的環境啊orz
全站熱搜