Linux客户端Active Directory身份validation在故障切换时停止工作

我试图通过目标DNS名称( corp.example.com)尝试进行AD身份validation的Linux客户端有问题。 我有两个域控制器服务器DC1(10.0.0.3/24)DC2(10.1.0.3/24)两个域控制器corp.example.com 。 在开始之前,每个Linux客户端都有两个AD服务器中的一个IP地址在其上明确定义。 我接着用IP地址replace了域名(corp.example.com),如下图所示。 testing它,它工作得很好。 但是,通过closures某个Dome Controller服务器来testing故障转移会导致某些Linux客户端无法进行身份validation和超时。 当我认为这是一个networking问题时,请参阅DC / DNS故障转移与全球/常见的DNS roundrobin为我原来的职位。 在Linux客户端上:

/etc/openldap/ldap.conf中

uri ldap://DC1 ldap://DC2 base dc=corp,dc=example,dc=com 

的/etc/krb5.conf

 [libdefaults] default_realm = corp.example.com clockskew = 300 dns_lookup_kdc # default_realm = EXAMPLE.COM [realms] corp.example.com= { kdc = corp.example.com default_domain = corp.example.com kpasswd_server = corp.example.com admin_server = corp.example.com } # EXAMPLE.COM = { # kdc = kerberos.example.com # admin_server = kerberos.example.com # } [logging] kdc = FILE:/var/log/krb5/krb5kdc.log admin_server = FILE:/var/log/krb5/kadmind.log default = SYSLOG:NOTICE:DAEMON [domain_realm] .corp.example.com = corp.example.com .corp = corp.example.com [appdefaults] pam = { ticket_lifetime = 1d renew_lifetime = 1d forwardable = true proxiable = false minimum_uid = 1 external = sshd use_shmem = sshd clockskew = 300 retain_after_close = false } 

/etc/resolve.conf

 search corp.example.com nameserver 10.0.0.3 nameserver 10.1.0.3 

这是我在syslog-ng中看到的

 Nov 30 09:04:56 linux_client nscd: nss_ldap: failed to bind to LDAP server ldap://ad3: Can't contact LDAP server Nov 30 09:04:59 linux_client sshd[15585]: nss_ldap: failed to bind to LDAP server ldap://ad3: Can't contact LDAP server Nov 30 08:50:19 linux_client sshd[15242]: Accepted keyboard-interactive/pam for jim from 10.0.0.231 port 61288 ssh2 Nov 30 08:52:02 linux_client sshd[15284]: nss_ldap: could not search LDAP server - Server is unavailable Nov 30 08:53:09 linux_client sshd[15284]: pam_unix2(sshd:auth): conversation failed Nov 30 08:53:16 linux_client sshd[15284]: error: ssh_msg_send: write Nov 30 08:53:26 linux_client sshd[15284]: pam_krb5[15284]: authentication fails for 'jim' ([email protected]): Authentication failure (Cannot read password) Nov 30 08:53:26 linux_client sshd[15284]: error: ssh_msg_send: write Nov 30 08:56:02 linux_client sshd[15289]: nss_ldap: could not search LDAP server - Server is unavailable Nov 30 08:56:27 linux_client sshd[15289]: pam_krb5[15289]: authentication succeeds for 'jim' ([email protected]) Nov 30 08:57:12 linux_client sshd[15289]: nss_ldap: could not search LDAP server - Server is unavailable Nov 30 08:57:18 linux_client sshd[15289]: _rebind_proc Nov 30 08:57:31 linux_client sshd[15289]: _rebind_proc Nov 30 08:57:34 linux_client sshd[15289]: _rebind_proc Nov 30 08:57:34 linux_client sshd[15289]: pam_ldap: ldap_result Timed out Nov 30 08:57:34 linux_client sshd[15289]: error: ssh_msg_send: write 

我看起来好像不是在尝试其他区议会?

而不是使用DNS对域控制器进行故障转移,/ /etc/openldap/ldap.conf允许您使用空格分隔的ldap服务器列表。 您仍然可以使用主机名称,而不是实际的IP地址。

例如: URI ldap://dc01.corp.example.com ldap://dc02.corp.example.com

有关更多信息,请参阅: http : //linux.die.net/man/5/ldap.conf

我也注意到你上面的2个IP地址在不同的子网中。 确保你的客户有两个通信。 你已经研究过networking问题,所以你可能没问题,但我想提一下,以防万一。