我正在尝试在 FreeIPA 和 Active Directory 之间建立信任。
基础设施详情:
- 3 个 IPA 服务器,彼此之间均有复制(CentOS 7)
- 3 个用于 AD 的域控制器 (Windows Server 2016)
尝试运行以下命令时:
ipa trust-add --type=ad ad.example.net --admin admin --password --server=DC1.ad.example.net
它在日志中产生了以下错误。
[Thu May 09 14:32:36.771267 2019] [:error] [pid 26493] ipa: ERROR: When setting forest trust information, got collision info back:
[Thu May 09 14:32:36.771308 2019] [:error] [pid 26493] lsa_ForestTrustCollisionInfo: struct lsa_ForestTrustCollisionInfo
[Thu May 09 14:32:36.771315 2019] [:error] [pid 26493] count : 0x00000001 (1)
[Thu May 09 14:32:36.771321 2019] [:error] [pid 26493] entries : *
[Thu May 09 14:32:36.771326 2019] [:error] [pid 26493] entries: ARRAY(1)
[Thu May 09 14:32:36.771332 2019] [:error] [pid 26493] entries : *
[Thu May 09 14:32:36.771337 2019] [:error] [pid 26493] entries: struct lsa_ForestTrustCollisionRecord
[Thu May 09 14:32:36.771343 2019] [:error] [pid 26493] index : 0x00000000 (0)
[Thu May 09 14:32:36.771349 2019] [:error] [pid 26493] type : LSA_FOREST_TRUST_COLLISION_TDO (0)
[Thu May 09 14:32:36.771354 2019] [:error] [pid 26493] flags : 0x00000004 (4)
[Thu May 09 14:32:36.771360 2019] [:error] [pid 26493] 0: LSA_TLN_DISABLED_NEW
[Thu May 09 14:32:36.771366 2019] [:error] [pid 26493] 0: LSA_TLN_DISABLED_ADMIN
[Thu May 09 14:32:36.771382 2019] [:error] [pid 26493] 1: LSA_TLN_DISABLED_CONFLICT
[Thu May 09 14:32:36.771388 2019] [:error] [pid 26493] 0: LSA_SID_DISABLED_ADMIN
[Thu May 09 14:32:36.771394 2019] [:error] [pid 26493] 0: LSA_SID_DISABLED_CONFLICT
[Thu May 09 14:32:36.771399 2019] [:error] [pid 26493] 1: LSA_NB_DISABLED_ADMIN
[Thu May 09 14:32:36.771405 2019] [:error] [pid 26493] 0: LSA_NB_DISABLED_CONFLICT
[Thu May 09 14:32:36.771410 2019] [:error] [pid 26493] name: struct lsa_String
[Thu May 09 14:32:36.771416 2019] [:error] [pid 26493] length : 0x0018 (24)
[Thu May 09 14:32:36.771422 2019] [:error] [pid 26493] size : 0x001a (26)
[Thu May 09 14:32:36.771427 2019] [:error] [pid 26493] string : *
[Thu May 09 14:32:36.771433 2019] [:error] [pid 26493] string : 'ad.example.net'
[Thu May 09 14:32:36.771439 2019] [:error] [pid 26493]
[Thu May 09 14:32:36.771535 2019] [:error] [pid 26493] ipa: ERROR: Attempt to solve forest trust topology conflicts
[Thu May 09 14:32:36.778084 2019] [:error] [pid 26493] ipa: ERROR: non-public: NTSTATUSError: (3221225695, 'The specified domain did not exist.')
[Thu May 09 14:32:36.778103 2019] [:error] [pid 26493] Traceback (most recent call last):
[Thu May 09 14:32:36.778109 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 369, in wsgi_execute
[Thu May 09 14:32:36.778115 2019] [:error] [pid 26493] result = command(*args, **options)
[Thu May 09 14:32:36.778121 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 450, in __call__
[Thu May 09 14:32:36.778126 2019] [:error] [pid 26493] return self.__do_call(*args, **options)
[Thu May 09 14:32:36.778132 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 478, in __do_call
[Thu May 09 14:32:36.778138 2019] [:error] [pid 26493] ret = self.run(*args, **options)
[Thu May 09 14:32:36.778143 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 800, in run
[Thu May 09 14:32:36.778164 2019] [:error] [pid 26493] return self.execute(*args, **options)
[Thu May 09 14:32:36.778175 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/plugins/trust.py", line 737, in execute
[Thu May 09 14:32:36.778181 2019] [:error] [pid 26493] result = self.execute_ad(full_join, *keys, **options)
[Thu May 09 14:32:36.778187 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/plugins/trust.py", line 992, in execute_ad
[Thu May 09 14:32:36.778193 2019] [:error] [pid 26493] trust_type
[Thu May 09 14:32:36.778198 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 1670, in join_ad_full_credentials
[Thu May 09 14:32:36.778204 2019] [:error] [pid 26493] trust_type, trust_external)
[Thu May 09 14:32:36.778210 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 1353, in establish_trust
[Thu May 09 14:32:36.778216 2019] [:error] [pid 26493] self.update_ftinfo(another_domain)
[Thu May 09 14:32:36.778221 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 1229, in update_ftinfo
[Thu May 09 14:32:36.778227 2019] [:error] [pid 26493] self.clear_ftinfo_conflict(another_domain, cinfo)
[Thu May 09 14:32:36.778232 2019] [:error] [pid 26493] File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 1125, in clear_ftinfo_conflict
[Thu May 09 14:32:36.778238 2019] [:error] [pid 26493] lsa.LSA_FOREST_TRUST_DOMAIN_INFO)
[Thu May 09 14:32:36.778244 2019] [:error] [pid 26493] NTSTATUSError: (3221225695, 'The specified domain did not exist.')
[Thu May 09 14:32:36.778604 2019] [:error] [pid 26493] ipa: INFO: [jsonserver_session] [email protected]: trust_add/1(u'ad.example.net', trust_type=u'ad', realm_admin=u'admin', realm_passwd=u'********', realm_server=u'DC1.ad.example.net', version=u'2.230'): InternalError
现在据我所知,它说我给了它一个无效的域名...但如果我运行:
systeminfo | findstr /B /C:"Domain"
在其中一台注册了域的机器上,它返回:
Domain: ad.example.net
所以我知道我使用的是正确的域名。
有人能解释一下为什么会失败吗?
答案1
基本上,IPA 域名已在 AD 林拓扑中的某个地方使用,而 Active Directory 域控制器拒绝将该域名路由到 IPA。IPA 中的自动拓扑冲突解决程序中的代码没有考虑由于 IPA 名称在 AD 中用作 UPN 而引发此类冲突的情况。
您是否在 AD 中将 example.com 作为 UPN?如果是,则无法使此信任起作用。您需要更改 IPA 域 (=realm),然后 AD DC 才会接受它。或者从 AD 端删除同名的 UPN。