【问题标题】:LDAP users not able to change their password using passwd commandLDAP 用户无法使用 passwd 命令更改密码
【发布时间】:2014-10-08 10:33:31
【问题描述】:

我有一个没有配置 SSL 的基本 LDAP 设置。用户可以使用 passwd 命令登录,但不能更改密码。我浏览了很多博客,但没有运气。我已禁用 selinux 和 iptables。

对此的任何帮助将不胜感激。

详情如下,

  • 操作系统:CentOS6.5
  • LDAP 版本:openldap-servers-2.4.23-34.el6_5.1.x86_64
  • 客户端版本:openldap-clients-2.4.23-34.el6_5.1.x86_64

尝试更改密码时终端的输出:

[servername ~]$ passwd
Changing password for user dkrishna.
Enter login(LDAP) password:
New password:
Retype new password:
LDAP password information update failed: Insufficient access
passwd: Authentication token manipulation error

以下是日志,

==> /var/log/secure

Oct  8 09:31:33  passwd: pam_unix(passwd:chauthtok): user "dkrishna" does not exist in /etc/passwd
Oct  8 09:31:42  passwd: pam_unix(passwd:chauthtok): user "dkrishna" does not exist in /etc/passwd

==> /var/log/messages

Oct  8 09:31:42  passwd: pam_ldap: ldap_modify_s Insufficient access

ACL 的配置如下,

database config
access to *
        by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
        by * none

database monitor
access to *
        by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read
        by dn.exact="cn=admin,dc=tibbr,dc=com" read
        by * none

access to attrs=userPassword
        by self write
        by anonymous auth
        by users none

access to * by * read

【问题讨论】:

    标签: ldap passwd


    【解决方案1】:

    我找到了解决办法:

    在文件末尾添加以下两行:oclDatabase\=\{2\}bdb.ldif

    olcAccess: {0}to attrs=userPassword by self write by dn.base="cn=Manager,dc=domain,dc=com" write by anonymous auth by * none
    
    olcAccess: {1}to * by dn.base="cn=Manager,dc=domain,dc=com" write by self write by * read
    

    再见

    【讨论】:

    • 非常感谢托马斯的回复。像魅力一样工作!已尝试在 slapd.conf 文件上放置相同的规则并重新启动服务,但它不起作用。但是直接放置在 oclDatabase\={2}bdb.ldif 文件中的相同规则有效。
    【解决方案2】:

    配置 OCL 数据库时,似乎不推荐使用 slapd.conf。

    从 OCL 配置指南中观察以下 sn-p: “从您运行转换开始,slapd.conf 文件就是多余的。加载 slapd 时会查找配置目录(默认 slapd.d)并从那里读取其配置文件并初始化 OLC (cn=config) DIT。如果找不到 slapd.d 目录,然后 slapd 查找 slapd.conf。”

    【讨论】:

    • OCL = 吗?适用于 C++ 的 Oracle 类库,Oracle 数据库接口。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多