adcli 無法使用 LDAPS 選項加入 AD

adcli 無法使用 LDAPS 選項加入 AD

ubuntu 18.04 上的 adcli 有問題,最近使用 ldaps 選項進行了更新。

它似乎無法找到 AD 的短名稱,並且即使在命令中和 /etc/ldap/ldap.conf 中指定了 CA,也無法連接到 LDAP

也嘗試在 SSSD 配置中配置 ldap_uri,但也沒有成功。

me@lnx-node-1:~# LDAPTLS_CACERT=/usr/local/share/ca-certificates/domain-ca.pem adcli join -U me-admin --domain=ad.somewhere.com -v
     * Using domain name: AD.SOMEWHERE.COM
     * Calculated computer account name from fqdn: LNX-NODE-1
     * Calculated domain realm from name: AD.SOMEWHERE.COM
     * Discovering domain controllers: _ldap._tcp.AD.SOMEWHERE.COM
     * Sending netlogon pings to domain controller: ldap://[####:650:###:d314::dc1]
     * Sending netlogon pings to domain controller: cldap://####.###.160.19
     * Sending netlogon pings to domain controller: ldap://[####:630:###:d314::dc4]
     * Sending netlogon pings to domain controller: cldap://###.###.160.59
     * Sending netlogon pings to domain controller: ldap://[####:630:###:e010::dc2]
     * Received NetLogon info from: itsdc-1.ad.somewhere.com
     * Wrote out krb5.conf snippet to /tmp/adcli-krb5-H8CKiH/krb5.d/adcli-krb5-conf-vv3c80
    Password for [email protected]: 
     * Authenticated as user: [email protected]
     * Using GSS-SPNEGO for SASL bind
     * ! Couldn't lookup domain short name: Can't contact LDAP server
     * Using fully qualified name: lnx-node-1.ad.somewhere.com
     * Using domain name: AD.SOMEWHER.COM
     * Using computer account name: LNX-NODE-1
     * Using domain realm: AD.SOMEWHER.COM
     * Calculated computer account name from fqdn: LNX-NODE-1
     * Generated 120 character computer password
     * Using keytab: FILE:/etc/krb5.keytab
     ! Couldn't lookup computer account: LNX-NODE-1$: Can't contact LDAP server
    adcli: joining domain AD.SOMEWHERE.COM failed: Couldn't lookup computer account: LNX-NODE-1$: Can't contact LDAP server

更新:管理了降級 adcli 軟體包的臨時解決方法apt install adcli=0.8.2-1,但仍需要修復。

答案1

看起來這裡有個報告的問題:

https://bugs.launchpad.net/ubuntu/bionic/+source/adcli/+bug/1906627

apt 不再安裝此軟體套件的損壞版本 (0.8.2-1ubuntu1)。

apt-cache policy adcli
adcli:
  Installed: 0.8.2-1
  Candidate: 0.8.2-1
  Version table:
 *** 0.8.2-1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

相關內容