
我有四台機器 A、B、C、D,我想在第一台機器上透過ldapsearch
ssh 隧道使用到 C,並從 B 跳到 C。ldapsearch
someuser@remote-c $ ldapsearch -x -LLL 'uid=someuser'
...
This works and returns my info
...
在 AI 上放置正確的憑證(複製我已經從 C 獲得的憑證)並將以下 ldap 配置放入/etc/ldap.conf
(在remote-c
裡面/etc/ldap/ldap.conf
)
URI ldaps://localhost:5000
...
並執行以下命令(或多或少,我說的someuser
意思是我在那台機器上擁有的帳戶)
someuser@remote-a $ ssh -L 5000:remote-d:636 -J someuser@remote-b someuser@remote-c
經過一些調試後,我認為隧道正在工作,但打開隧道後我仍然無法從 聯繫 ldap 伺服器remote-a
。
主要問題是 ldapsearch 看起來並沒有真正加載該配置文件,即使它與其他機器基本相同。
版本。我不知道這可能取決於我使用的 OpenLDAP 版本,所以它們是:
remote-a
:someuser@remote-a $ ldapsearch -V ldapsearch: @(#) $OpenLDAP: ldapsearch 2.6.2 (May 29 2022 09:54:34) $ openldap (LDAP library: OpenLDAP 20602)
在這台機器上我幾乎可以安裝我想要的任何東西,所以這是最新的)
remote-c
:someuser@remote-c $ ~$ ldapsearch -V ldapsearch: @(#) $OpenLDAP: ldapsearch (May 2 2020 00:44:42) $ pbuilder@build01:/build/openldap-2.4.40+dfsg/debian/build/clients/tools (LDAP library: OpenLDAP 20440)
這可以工作,但我無法更新舊的 LDAP 版本。
所以我的問題是 ldap 是否確實需要該位置的配置,如果是,字串是否ldaps://localhost:5000
正確。