Active-Directory

SSSD Kerberos AD Centos 故障排除

  • June 20, 2016

我遵循了 RedHat AD 集成中的配置 3 ( https://access.redhat.com/sites/default/files/attachments/rhel-ad-integration-deployment-guidelines-v1.5.pdf );但我被困住了。

我在 Centos 6.8 上。

我有一個有效的 AD 連接:

service sssd stop
rm -r /var/lib/sss/db/*
rm -r /var/lib/sss/mc/*
service sssd start
getent passwd robau@MYNETWORK.LOCAL

這將返回一條合理的線:

robau:*:102201201:102200513:Rob Audenaerde:/:

但是,當我嘗試通過 SSH 連接時,我無法登錄。我在sssd.conf.

我看到的錯誤(在var/log/sssd/krb5_child.log)是:

(Fri Jun 17 17:23:18 2016) [[sssd[krb5_child[3561]]]] [validate_tgt] (0x0020): TGT failed verification using key for [host/server-new.mynetwork.nl@MYNETWORK.LOCAL].
(Fri Jun 17 17:23:18 2016) [[sssd[krb5_child[3561]]]] [get_and_save_tgt] (0x0020): 1240: [-1765328377][Server not found in Kerberos database]
(Fri Jun 17 17:23:18 2016) [[sssd[krb5_child[3561]]]] [map_krb5_error] (0x0020): 1301: [-1765328377][Server not found in Kerberos database]
(Fri Jun 17 17:23:18 2016) [[sssd[krb5_child[3561]]]] [k5c_send_data] (0x0200): Received error code 1432158209

伺服器在 DNS 中,我可以使用它找到它nslookup

  nslookup server-new.mynetwork.nl

  Server:  192.168.110.56
  Address: 192.168.110.56#53

  Name:    server-new.mynetwork.nl
  Address: 192.168.210.94

kvno host/server-new.mynetwork.nl@MYNETWORK.LOCAL
kvno: Server not found in Kerberos database while getting credentials for host/server-new.mynetwork.nl@MYNETWORK.LOCAL

故障排除的任何提示/提示?

$$ EDIT $$ 我曾經authconfig設置必要的pam東西nss

authconfig --enablesssdauth --enablesssd --enablemkhomedir --update

輸出klist -kte

 25 06/20/16 10:56:24 host/server-new.mynetwork.nl@MYNETWORK.LOCAL (des-cbc-crc) 
 25 06/20/16 10:56:24 host/server-new.mynetwork.nl@MYNETWORK.LOCAL (des-cbc-md5) 
 25 06/20/16 10:56:24 host/server-new.mynetwork.nl@MYNETWORK.LOCAL (aes128-cts-hmac-sha1-96) 
 25 06/20/16 10:56:24 host/server-new.mynetwork.nl@MYNETWORK.LOCAL (aes256-cts-hmac-sha1-96) 
 25 06/20/16 10:56:24 host/server-new.mynetwork.nl@MYNETWORK.LOCAL (arcfour-hmac) 
 25 06/20/16 10:56:24 host/server-new@MYNETWORK.LOCAL (des-cbc-crc) 
 25 06/20/16 10:56:24 host/server-new@MYNETWORK.LOCAL (des-cbc-md5) 
 25 06/20/16 10:56:25 host/server-new@MYNETWORK.LOCAL (aes128-cts-hmac-sha1-96) 
 25 06/20/16 10:56:25 host/server-new@MYNETWORK.LOCAL (aes256-cts-hmac-sha1-96) 
 25 06/20/16 10:56:25 host/server-new@MYNETWORK.LOCAL (arcfour-hmac) 
 25 06/20/16 10:56:25 SERVER-NEW$@MYNETWORK.LOCAL (des-cbc-crc) 
 25 06/20/16 10:56:25 SERVER-NEW$@MYNETWORK.LOCAL (des-cbc-md5) 
 25 06/20/16 10:56:25 SERVER-NEW$@MYNETWORK.LOCAL (aes128-cts-hmac-sha1-96) 
 25 06/20/16 10:56:25 SERVER-NEW$@MYNETWORK.LOCAL (aes256-cts-hmac-sha1-96) 
 25 06/20/16 10:56:26 SERVER-NEW$@MYNETWORK.LOCAL (arcfour-hmac)

的輸出klist

Ticket cache: FILE:/tmp/krb5cc_0
Default principal: SERVER-NEW$@MYNETWORK.LOCAL

Valid starting     Expires            Service principal
06/20/16 10:56:41  06/20/16 20:56:41  krbtgt/MYNETWORK.LOCAL@MYNETWORK.LOCAL
   renew until 06/27/16 10:56:41
06/20/16 11:36:07  06/20/16 20:56:41  ldap/my-ad.mynetwork.local@MYNETWORK.LOCAL
   renew until 06/27/16 10:56:41

$$ EDIT 2 $$ 如果我在本節krb5_validate末尾添加sssd.conf

$$ domain/mynetwork.local $$然後我就可以登錄了。但是,我還設置了另一個不需要這一步的伺服器,所以我不願意這樣。 $$ EDIT 3 $$ 在net ads join -k我收到錯誤/警告期間:

DNS Update for failed: ERROR_DNS_GSS_ERROR 
DNS update failed!

$$ EDIT 4 $$ 我看到輸出net ads info沒有使用我在配置文件中指定的主域控制器(並且是 2003R2 而不是 2008R2)。有沒有辦法“強制”net ads join -k使用特定的域控制器?

嘗試安裝並執行msktutil(可通過 EPEL 獲得)。

安裝:

yum -y --enablerepo=epel install msktutil

要執行它:

msktutil --auto-update --server my-ad --verbose

然後執行 kinit :

kinit -k server-new$

此外,您應該 cron 這兩個作業每 6 小時左右執行一次。這樣你的票就不會過期。

對 EDIT4 的回答:您應該能夠使用 指定伺服器net ads join -k -S,但預設情況下,它將在您的 DNS 中搜尋 SRV 記錄。這很好。除非你不想那樣。如果您希望特定站點使用與另一個不同的 DC,請查看 Active Directory 站點和服務。

引用自:https://serverfault.com/questions/784636