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 / 问题 / 627809
Accepted
mohrphium
mohrphium
Asked: 2014-09-12 04:20:49 +0800 CST2014-09-12 04:20:49 +0800 CST 2014-09-12 04:20:49 +0800 CST

重新启动服务器后,通过 NSLCD 使用 LDAP 用户进行 SSH 登录可以工作

  • 772

我在许多服务器上运行了一个有效的 nslcd 设置。我将此配置分发到许多服务器,几乎所有这些服务器都可以正常工作。

但是我忘记在其中五个上安装 libnss-ldapd 和 libpam-ldapd。

这导致了以下 nslcd 调试日志

  nslcd: DEBUG: add_uri(ldaps://dc.example.com/)
  nslcd: DEBUG: ldap_set_option(LDAP_OPT_X_TLS_CACERTDIR,"/etc/ssl/certs")
  nslcd: DEBUG: ldap_set_option(LDAP_OPT_X_TLS_CACERTFILE,"/etc/ssl/certs/example.com.pem")
  nslcd: version 0.8.10 starting
  nslcd: DEBUG: unlink() of /var/run/nslcd/socket failed (ignored): No such file or directory
  nslcd: DEBUG: setgroups(0,NULL) done
  nslcd: DEBUG: setgid(108) done
  nslcd: DEBUG: setuid(107) done
  nslcd: accepting connections

  nslcd: [8b4567] DEBUG: connection from pid=6939 uid=0 gid=0
  nslcd: [8b4567] <authc="user"> DEBUG: nslcd_pam_authc("user","sshd","***")
  nslcd: [8b4567] <authc="user"> DEBUG: myldap_search(base="********", filter="(&(memberOf=********)(sAMAccountName=user))")
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_initialize(ldaps://dc.example.com/,)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_rebind_proc()
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_X_TLS,LDAP_OPT_X_TLS_HARD)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_simple_bind_s("cn=********,dc=example,dc=com","***") (uri="ldaps://dc.example.com/,")
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_result(): CN=user,OU=********,DC=example,DC=com
  nslcd: [8b4567] <authc="user"> DEBUG: myldap_search(base="CN=user,OU=********,DC=example,DC=com", filter="(objectClass=*)")
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_initialize(ldaps://dc.example.com/,)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_rebind_proc()
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_set_option(LDAP_OPT_X_TLS,LDAP_OPT_X_TLS_HARD)
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_simple_bind_s("CN=user,OU=********,DC=example,DC=com","***") (uri="ldaps://dc.example.com/,")
  nslcd: [8b4567] <authc="user"> DEBUG: failed to bind to LDAP server ldaps://dc.example.com/,: Invalid credentials: 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1
  nslcd: [8b4567] <authc="user"> DEBUG: ldap_unbind()

我知道配置正在运行,因为我没有更改任何内容并且它正在其他服务器上运行。

我设法通过重新启动服务器使 ldap 工作,所以似乎通过在推出后安装 libnss-ldapd 和 libpam-ldapd,某些模块被挂断了。

问题 我想知道这是哪个模块以及是否可以在不重新启动服务器的情况下重新加载它。

仅供参考:简单的“服务 nslcd 重启”并没有解决问题。但是,重新启动后,一切都按预期工作。

debian
  • 1 1 个回答
  • 3826 Views

1 个回答

  • Voted
  1. Best Answer
    mohrphium
    2015-02-01T03:28:51+08:002015-02-01T03:28:51+08:00

    这是前一段时间,但我认为解决方案是重新启动 nscd - 或者在我们的情况下删除它,因为我们不需要它。

    nslcd 负责 ldap 连接,但 nscd 只是做缓存。

    因此,通过删除或重新启动 nscd 缓存被清空并且设置有效:)

    • 1

相关问题

  • 关闭 FTP

  • 如何在同一台电脑上从 putty 连接 debian vmware

  • debian- 文件到包的映射

  • Debian Ubuntu 网络管理器错误 [关闭]

  • 为本地网络中的名称解析添加自定义 dns 条目

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