我已經在Ubuntu 14.04上安裝了ldap 2.4.3。我配置了pwdPolicy覆蓋,當用戶更改他/她自己的密碼以及管理員更改密碼時,它將工作。問題是,當管理員更改密碼時,策略不被遵守。因此,我創建了另一個名爲usermanagement的帳戶,並將該dn添加到oclAccess。我可以修改使用usermanagement帳戶嘗試過的所有字段,但用戶密碼除外。ldap oclAccess似乎不適用於pwdPolicy
當運行ldappasswd我得到Insufficient access (50)
這是我的olcAccess:
olcAccess: {0}to attrs=userPassword,shadowLastChange by self write by dn="cn=admin,dc=zed,dc=com" write by dn="cn=usermanagement,dc=zed,dc=com" write by anonymous auth by * none
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to * by self write by dn="cn=admin,dc=zed,dc=com" write by dn="cn=usermanagement,dc=zed,dc=com" write by * read
編輯
我已經啓用調試,然後執行ldappasswd -H ldap://localhost -x -D "uid=luis,ou=users,dc=zed,dc=com" -W -S "uid=vixian,ou=users,dc=zed,dc=com"
。日誌顯示:
983c0f8 bdb_dn2entry("cn=passworddefault,ou=policies,dc=zed,dc=com")
5983c0f8 => bdb_entry_get: found entry: "cn=passworddefault,ou=policies,dc=zed,dc=com"
5983c0f8 bdb_entry_get: rc=0
5983c0f8 change password must use DELETE followed by ADD/REPLACE
5983c0f8 send_ldap_result: conn=1004 op=1 p=3
5983c0f8 send_ldap_result: err=50 matched="" text="Must supply old password to be changed as well as new one"
5983c0f8 send_ldap_extended: err=50 oid= len=0
5983c0f8 send_ldap_response: msgid=2 tag=120 err=50
我又試圖使用ldapmodify可以刪除的userPassword,它是成功的,但更換或增加生產否認了相同的結果權限。
我已經更新了olcAccess以下@ejp建議:
olcAccess: {0}to attrs=userPassword,shadowLastChange
by group/groupOfUniqueNames/uniqueMember.exact="cn=itinst,ou=groups,dc=zed,dc=com" write
by anonymous auth
by self write
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to *
by self write
by group/groupOfUniqueNames/uniqueMember.exact="cn=itinst,ou=groups,dc=zed,dc=com" write
by users read by anonymous search
我已經從olcAccesss中刪除了管理員;也許我的配置被格式化的缺乏所誤導,但匿名沒有被賦予寫入權限。我已經在DIT中添加了一個帳戶,但仍然無法訪問。 – Luis
好吧,我誤讀了,解決了這個問題,並且看到了編輯。你能發佈你的密碼政策條目嗎?和'ppolicy'配置? – EJP