AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 968074
Accepted
dovla110010101
dovla110010101
Asked: 2019-05-21 03:49:59 +0800 CST2019-05-21 03:49:59 +0800 CST 2019-05-21 03:49:59 +0800 CST

更改密码 - ldap 更新问题

  • 772

我已将目录 389 和 1 个服务器设置为客户端,用于测试用户的身份验证等。

对于目录的安装,我使用了本教程:

在 CentOS 7 中安装和配置 LDAP 服务器

对于安装客户端,我使用了本教程: 如何为 389 目录服务器安装配置 LDAP 客户端

现在 ds-389 和客户端身份验证工作,但是当我尝试更改 ldap 用户的密码时,我收到一些奇怪的消息:

5 月 20 日 13:40:55 服务器密码:pam_unix(passwd:chauthtok):用户“test”在 /etc/passwd 中不存在 5 月 20 日 13:41:06 服务器密码:pam_unix(passwd:chauthtok):用户“test”在 /etc/passwd 中不存在 5 月 20 日 13:41:06 服务器密码:pam_ldap(passwd:chauthtok):密码更改失败:密码更改失败:需要保密;user=test 5 月 20 日 13:41:06 服务器密码:gkr-pam:无法更改登录密钥环的密码:密码不匹配。5 月 20 日 13:41:06 服务器密码:gkr-pam:停止守护进程

有谁知道可能是什么问题?我的 pam 配置如下所示:

密码验证:

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        required      pam_faildelay.so delay=2000000
auth        sufficient    pam_unix.so nullok try_first_pass
auth        sufficient    pam_ldap.so use_first_pass
auth        required      pam_deny.so

account     required      pam_access.so
account     required      pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     [default=bad success=ok user_unknown=ignore] pam_ldap.so
account     required      pam_permit.so

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password    sufficient    pam_ldap.so use_authtok


password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
-session     optional      pam_systemd.so
session     optional      pam_oddjob_mkhomedir.so skel=/etc/skel umask=0077
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_ldap.so

系统认证

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        required      pam_faildelay.so delay=2000000
auth        sufficient    pam_fprintd.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        sufficient    pam_ldap.so use_first_pass
auth        required      pam_deny.so

account     required      pam_access.so
account     required      pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     [default=bad success=ok user_unknown=ignore] pam_ldap.so
account     required      pam_permit.so

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password    sufficient    pam_ldap.so use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
-session     optional      pam_systemd.so
session     optional      pam_oddjob_mkhomedir.so skel=/etc/skel umask=0077
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_ldap.so
ldap
  • 1 1 个回答
  • 789 Views

1 个回答

  • Voted
  1. Best Answer
    dovla110010101
    2019-05-21T23:50:13+08:002019-05-21T23:50:13+08:00

    好的,就我而言,我浪费了一整天的时间来使用配置和wireshark,发现为了让用户能够更改密码,您需要启用 ds-389 加密,并且您的客户端需要连接到端口 636 SSL/TLS 以“安全”传递机密数据,在我们的例子中是密码。跳过最重要的部分后有点傻;D

    所以为了让系统正常运行,首先我们需要在ds-389上生成证书

    为此,我使用了这个简短的教程: Configure TLS SSL 389 Directory Server CentOS

    请注意为您的 ds-389 设置 PIN 并重新启动服务,当然……所以在您设置好 ds-389 上的所有内容后,下一步就是让客户端连接到特定端口。作为先决条件,您需要使用以下命令将 crt 导出到 pem:

    openssl x509 -in ca-cert.crt -out ca-cert.pem -outform PEM
    

    将该 ca-cert.pem 复制到您的(客户端),例如从您 scp ca-cert.pem 的主文件夹(或您复制该文件的任何位置)

    mv (scp-cert-path)/ca-cert.pem /etc/openldap/cacerts/
    

    作为最后一步,使用 authconfig-tui 将您的客户端设置为使用 TLS 而不是纯文本的 389 端口...

    您可以从此链接执行以下步骤: 如何为 389 目录服务器安装配置 LDAP 客户端

    我希望我能帮助某人节省一些时间和谷歌的折磨;)干杯。

    • 0

相关问题

  • Cygwin sshd 和 LDAP 身份验证

  • 从 OpenLDAP 检索操作属性

  • 为 Mac 网络使用 Linux 和 Open LDAP

  • 使用LDAP服务器身份验证的Linux中单个用户的多个登录名

  • 使用 smbldap 管理用户/组的 Web 前端

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve