Ubuntu 12.04,Windows 2012 Active Directory集成,Kerberos不能parsing服务主体

从字面上检查整个互联网之后,我希望我可以在这里得到帮助。

我正尝试使用nfs和单一login将ubuntu 12.04服务器集成到Windows 2012活动目录中。

build立:

什么工作

  • Windows 2012 AD安装与dns ntp和dhcp
  • Ubuntu的服务器注册与msktutil广告和获取
    1. 用户的kerberos门票(例如kinit [email protected]作品)
    2. 和机器(kinit -k [email protected]工程),
    3. uids和gids可以使用AD上的UNIX和gssapi上的sssd使用身份pipe理来解决。

什么不行:

  • 在srv03上的srv04上挂载一个NFS共享。
  • 为服务主体获得一张kerberos票。

例如。

sudo kdestroy sudo kinit -k kinit: Client 'host/[email protected]' not found in Kerberos database while getting initial credentials 

srv03的krb5.keytab,srv04的模拟。

 sudo klist -ke Keytab name: FILE:/etc/krb5.keytab KVNO Principal ---- -------------------------------------------------------------------------- 10 [email protected] (arcfour-hmac) 10 [email protected] (aes128-cts-hmac-sha1-96) 10 [email protected] (aes256-cts-hmac-sha1-96) 10 nfs/[email protected] (arcfour-hmac) 10 nfs/[email protected] (aes128-cts-hmac-sha1-96) 10 nfs/[email protected] (aes256-cts-hmac-sha1-96) 10 host/[email protected] (arcfour-hmac) 10 host/[email protected] (aes128-cts-hmac-sha1-96) 10 host/[email protected] (aes256-cts-hmac-sha1-96) 

nfs导出:

 cat /etc/exports /export gss/krb5(rw,fsid=0,no_subtree_check,sync,insecure,crossmnt,anonuid=65534,anongid=65534) /export/users gss/krb5(rw,no_subtree_check,sync,insecure,nohide,anonuid=65534,anongid=65534) /export/groups gss/krb5(rw,no_subtree_check,sync,insecure,nohide,anonuid=65534,anongid=65534) /export/share gss/krb5(rw,no_subtree_check,sync,insecure,nohide,anonuid=65534,anongid=65534) /export/backup gss/krb5(rw,no_subtree_check,sync,insecure,nohide,anonuid=65534,anongid=65534) 

安装在srv04上

 sudo mount -t nfs4 -o sec=krb5 srv03:/export /mnt 

给我的错误

 srv04 rpc.gssd[754]: ERROR: No credentials found for connection to server srv03 

Active Directory将srv03和srv04列为具有正确服务主体名称的域计算机(名称相应更改)

 service principal name = nfs/srv03.lettrich.local; host/srv03.lettrich.local 

我的错误在哪里? (是的,时间是同步的;-))

将在需要时提供进一步的信息。

预先感谢所有愿意帮助的人。

首先,你应该直接注册并恢复新的Linux服务器的DNSlogging。 在Windows域注册这个。

其次,在Linux服务器上将DNSparsing器指向Windows,并在linux中修改/ etc / hosts以获取正确的字段

第三,你必须安装Kerberos5和winbind apps / modules / libraries

第四,configuration/etc/krb5.conf:

 [libdefaults] default_realm = YOUR.FULL.DOMAIN.WITH.UPPER.CHARS [realms] YOUR.FULL.DOMAIN.WITH.UPPER.CHARS = { kdc = list of IPs windows domain servers admin_server = one ip for master domain server } [domain_realm] your.full.comain.with.lover.chars = YOUR.FULL.DOMAIN.WITH.UPPER.CHARS [logging] #example logging kdc = FILE:/var/log/kerberos/krb5kdc.log admin_server = FILE:/var/log/kerberos/kadmin.log default = FILE:/var/log/kerberos/krb5lib.log 

第五,configuration/etc/samba/smb.conf:

 [global] workgroup = YOUR.SHORT.DOMAIN.WITH.UPPER.CASE netbios name = YOUR.SERVER.NAME.WITH.UPPER.CASE.WITHOUT.DOMAIN realm = YOUR.FULL.DOMAIN.WITH.UPPER.CHARS security = ads password server = windows.ip.server.what.allows.password.change wins server = as.above.supports.wins.messages wins proxy = no kerberos method = system keytab dedicated keytab file = /etc/krb5.keytab server string = write what you want using %h as host name dns proxy = no idmap config * : backend = rid idmap config * : range = 10000-20000 winbind use default domain = Yes winbind enum users = Yes winbind enum groups = Yes winbind nested groups = Yes winbind separator = + winbind refresh tickets = yes template shell = /bin/bash template homedir = /home/%D/%U preferred master = no inherit acls = Yes map acl inherit = Yes acl group control 

第六,validation你能够使用临时任何用户连接:

 wbinfo -t #test only net getdomainsid #should print local and domain identifier wbinfo -u #domain user list, may take long time for many users wbinfo -g #domain group list 

第七,创build密码永不过期,不能更改的技术用户帐户。 其他人离开默认。 收集该用户在单独的AD目录:)

第八,生成密钥表:

net ads keytab create -U [email protected]

然后检查/etc/krb5.keytab是否存在

现在你可以configuration其他服务,特别是使用ntlm helper。 您可以使用以下方式testing连接:

 ntlm_auth --username UPPER.CASE.SHORTNAME.DOMAIN+your.technical.username 

写密码,你应该看到状态:

 NT_STATUS_OK: Success (0x0) 

现在你可以configurationPAM来validation许多服务,但我没有这样做。 我用apache2.2 ntlm身份validation成功地使用该configuration。 我看到了用于ssh和Xsession的pamconfiguration。

主要思想是,只有winbindauthentication到Active Directory。 所有其他服务以任何方式在本地validationwinbind。 Winbind是桑巴舞的一部分。 如果你不需要samba,只安装winbind,这会安装一些samba库。

有时在configuration连接时,wbinfo无法连接。 然后,您必须等待5分钟或更长时间才能进行域信息传播。

当然,所有的mashines上的时间应该是同步的。 为此configurationNTP。 我使用debian,但Ubuntu的使所有类似的debian :)祝你好运。

你是如何为客户创buildSPN的?

我用Samba做了很好的结果( networking广告join )。

我不得不承认,随着时间的推移,我忘了回答和closures这个线程。 遵循这些指示以及创build正确的SSSDconfiguration解决了我的问题: http ://ubuntuforums.org/showthread.php?t=1924660