Samba4 加入NT_STATUS_CONNECTION_REFUSED错误

Samba4 加入NT_STATUS_CONNECTION_REFUSED错误

我有一台 Centos 7.2 服务器,运行 Samba 4.6.13 作为活动目录域控制器。我正尝试将一台运行 Samba 4.7.5 的新 Fedora 27 服务器加入域。域命令不会连接到另一台服务器。

我在两台服务器上都禁用了防火墙,可以双向 ping。在新服务器上,我能够执行kinit -U administrator并获取显示 klist 的 kerberos 票证,但是当我加入域时,我得到:

ERROR(ldb): uncaught exception - LDAP client internal error: NT_STATUS_CONNECTION_REFUSED
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/domain.py", line 661, in run
    machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
  File "/usr/lib64/python2.7/site-packages/samba/join.py", line 1455, in join_DC
    machinepass, use_ntvfs, dns_backend, promote_existing)
  File "/usr/lib64/python2.7/site-packages/samba/join.py", line 89, in __init__
    credentials=ctx.creds, lp=ctx.lp)
  File "/usr/lib64/python2.7/site-packages/samba/samdb.py", line 57, in __init__
options=options)
  File "/usr/lib64/python2.7/site-packages/samba/__init__.py", line 114, in __init__
self.connect(url, flags, options)
  File "/usr/lib64/python2.7/site-packages/samba/samdb.py", line 72, in connect
options=options)

连接命令是:

samba-tool domain join redacteddomain.redacted.com DC -U"REDACTEDDOMAIN\administrator" --dns-backend=SAMBA_INTERNAL --option="interfaces=10.10.9.20" --option="bind interfaces only=yes" --option='idmap_ldb:use rfc2307 = yes' -d 10

我正在尝试启动并运行第二台服务器,因为我的网络上有几台机器拒绝加入 Centos 7.2 域。我收到一条消息“指定的服务器无法执行请求的操作。”并且我的事件日志中出现了“代码 58”。

我在这里碰壁了。我似乎无法在 Google 上找到有关 join 返回该错误的任何信息,只有 smbclient 连接尝试。有人有什么想法吗?

以下是扩展的调试:

[root@new-dc ~]#samba-tool domain join redacteddomain.redacted.com DC -U"REDACTEDDOMAIN\administrator" --dns-backend=SAMBA_INTERNAL --option='idmap_ldb:use rfc2307 = yes' -d 10                                                                INFO: Current debug levels:
  all: 10
  tdb: 10
  printdrivers: 10
  lanman: 10
  smb: 10
  rpc_parse: 10
  rpc_srv: 10
  rpc_cli: 10
  passdb: 10
  sam: 10
  auth: 10
  winbind: 10
  vfs: 10
  idmap: 10
  quota: 10
  acls: 10
  locking: 10
  msdfs: 10
  dmapi: 10
  registry: 10
  scavenger: 10
  dns: 10
  ldb: 10
  tevent: 10
  auth_audit: 10
  auth_json_audit: 10
  kerberos: 10
  drs_repl: 10
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
Finding a writeable DC for domain 'redacteddomain.redacted.com'
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
finddcs: searching for a DC by DNS domain redacteddomain.redacted.com
finddcs: looking for SRV records for _ldap._tcp.redacteddomain.redacted.com
resolve_lmhosts: Attempting lmhosts lookup for name _ldap._tcp.redacteddomain.redacted.com<0x0>
getlmhostsent: lmhost entry: 127.0.0.1 localhost
getlmhostsent: lmhost entry: 10.10.11.4 old-dc.redacteddomain.redacted.com
ads_dns_lookup_srv: 2 records returned in the answer section.
ads_dns_parse_rr_srv: Parsed old-dc.redacteddomain.redacted.com [100, 389, 0]
ads_dns_parse_rr_srv: Parsed old-dc.redacteddomain.redacted.com [0, 100, 389]
finddcs: DNS SRV response 0 at '10.10.11.4'
finddcs: DNS SRV response 1 at '10.10.11.4'
finddcs: performing CLDAP query on 10.10.11.4
     &response->data.nt5_ex: struct NETLOGON_SAM_LOGON_RESPONSE_EX
        command                  : LOGON_SAM_LOGON_RESPONSE_EX (23)
        sbz                      : 0x0000 (0)
        server_type              : 0x000013fd (5117)
               1: NBT_SERVER_PDC
               1: NBT_SERVER_GC
               1: NBT_SERVER_LDAP
               1: NBT_SERVER_DS
               1: NBT_SERVER_KDC
               1: NBT_SERVER_TIMESERV
               1: NBT_SERVER_CLOSEST
               1: NBT_SERVER_WRITABLE
               1: NBT_SERVER_GOOD_TIMESERV
               0: NBT_SERVER_NDNC
               0: NBT_SERVER_SELECT_SECRET_DOMAIN_6
               1: NBT_SERVER_FULL_SECRET_DOMAIN_6
               0: NBT_SERVER_ADS_WEB_SERVICE
               0: NBT_SERVER_DS_8
               0: NBT_SERVER_HAS_DNS_NAME
               0: NBT_SERVER_IS_DEFAULT_NC
               0: NBT_SERVER_FOREST_ROOT
        domain_uuid              : 5b3dff07-e3e8-4ef7-956d-e076f01f31b7
        forest                   : 'redacteddomain.redacted.com'
        dns_domain               : 'redacteddomain.redacted.com'
        pdc_dns_name             : 'old-dc.redacteddomain.redacted.com'
        domain_name              : 'REDACTEDDOMAIN'
        pdc_name                 : 'OLD-DC'
        user_name                : ''
        server_site              : 'Default-First-Site-Name'
        client_site              : 'Default-First-Site-Name'
        sockaddr_size            : 0x00 (0)
        sockaddr: struct nbt_sockaddr
            sockaddr_family          : 0x00000000 (0)
            pdc_ip                   : (null)
            remaining                : DATA_BLOB length=0
        next_closest_site        : NULL
        nt_version               : 0x00000005 (5)
               1: NETLOGON_NT_VERSION_1
               0: NETLOGON_NT_VERSION_5
               1: NETLOGON_NT_VERSION_5EX
               0: NETLOGON_NT_VERSION_5EX_WITH_IP
               0: NETLOGON_NT_VERSION_WITH_CLOSEST_SITE
               0: NETLOGON_NT_VERSION_AVOID_NT4EMUL
               0: NETLOGON_NT_VERSION_PDC
               0: NETLOGON_NT_VERSION_IP
               0: NETLOGON_NT_VERSION_LOCAL
               0: NETLOGON_NT_VERSION_GC
        lmnt_token               : 0xffff (65535)
        lm20_token               : 0xffff (65535)
finddcs: Found matching DC 10.10.11.4 with server_type=0x000013fd
Found DC old-dc.redacteddomain.redacted.com
Security token SIDs (1):
  SID[  0]: S-1-5-18
 Privileges (0xFFFFFFFFFFFFFFFF):
  Privilege[  0]: SeMachineAccountPrivilege
  Privilege[  1]: SeTakeOwnershipPrivilege
  Privilege[  2]: SeBackupPrivilege
  Privilege[  3]: SeRestorePrivilege
  Privilege[  4]: SeRemoteShutdownPrivilege
  Privilege[  5]: SePrintOperatorPrivilege
  Privilege[  6]: SeAddUsersPrivilege
  Privilege[  7]: SeDiskOperatorPrivilege
  Privilege[  8]: SeSecurityPrivilege
  Privilege[  9]: SeSystemtimePrivilege
  Privilege[ 10]: SeShutdownPrivilege
  Privilege[ 11]: SeDebugPrivilege
  Privilege[ 12]: SeSystemEnvironmentPrivilege
  Privilege[ 13]: SeSystemProfilePrivilege
  Privilege[ 14]: SeProfileSingleProcessPrivilege
  Privilege[ 15]: SeIncreaseBasePriorityPrivilege
  Privilege[ 16]: SeLoadDriverPrivilege
  Privilege[ 17]: SeCreatePagefilePrivilege
  Privilege[ 18]: SeIncreaseQuotaPrivilege
  Privilege[ 19]: SeChangeNotifyPrivilege
  Privilege[ 20]: SeUndockPrivilege
  Privilege[ 21]: SeManageVolumePrivilege
  Privilege[ 22]: SeImpersonatePrivilege
  Privilege[ 23]: SeCreateGlobalPrivilege
  Privilege[ 24]: SeEnableDelegationPrivilege
 Rights (0x               0):
lpcfg_servicenumber: couldn't find ldb
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
added interface enp3s0 ip=10.10.9.20 bcast=10.10.11.255 netmask=255.255.252.0
resolve_lmhosts: Attempting lmhosts lookup for name old-dc.redacteddomain.redacted.com<0x20>
getlmhostsent: lmhost entry: 127.0.0.1 localhost
getlmhostsent: lmhost entry: 10.10.11.4 old-dc.redacteddomain.redacted.com
Failed to connect to ldap URL 'ldap://old-dc.redacteddomain.redacted.com' - LDAP client internal error: NT_STATUS_CONNECTION_REFUSED
Failed to connect to 'ldap://old-dc.redacteddomain.redacted.com' with backend 'ldap': LDAP client internal error: NT_STATUS_CONNECTION_REFUSED
ERROR(ldb): uncaught exception - LDAP client internal error: NT_STATUS_CONNECTION_REFUSED
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/domain.py", line 661, in run
    machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
  File "/usr/lib64/python2.7/site-packages/samba/join.py", line 1455, in join_DC
    machinepass, use_ntvfs, dns_backend, promote_existing)
  File "/usr/lib64/python2.7/site-packages/samba/join.py", line 89, in __init__
    credentials=ctx.creds, lp=ctx.lp)
  File "/usr/lib64/python2.7/site-packages/samba/samdb.py", line 57, in __init__
    options=options)
  File "/usr/lib64/python2.7/site-packages/samba/__init__.py", line 114, in __init__
    self.connect(url, flags, options)
  File "/usr/lib64/python2.7/site-packages/samba/samdb.py", line 72, in connect
    options=options)

答案1

如果其他人最终也陷入和我一样的困境,那么解决这个问题的方法是这样的:

编辑您的 smb.conf 文件并将“tls enabled=no”添加到 [global] 部分。

答案2

我已经在 Ubuntu 16.06 上通过更改 /etc/samba/smb.conf 文件中的 bind interface only = no 解决了这个问题

相关内容