]> git.decadent.org.uk Git - nfs-utils.git/commit
Support AD style kerberos automatically in rpc.gss
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 9 Feb 2011 16:27:19 +0000 (11:27 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 9 Feb 2011 16:33:32 +0000 (11:33 -0500)
commit45e4597bd570ed40221f51887cde7d7f096f55e7
tree195ae858569b1fcf4984a254b495e96c36f26800
parent730f6986f86873513fa021a450eb55ccd0f2fbff
Support AD style kerberos automatically in rpc.gss

An Active Directory KDC will only grant a TGT for UPNs, getting
a TGT for SPNs is not possible:

$ kinit -k host/ib5@ADS.ORCORP.CA
kinit: Client not found in Kerberos database while getting initial
credentials

The correct thing to do for machine credentials is to get a TGT
for the computer UPN <HOSTNAME>$@REALM:
$ kinit -k IB5\$
$ klist
12/22/10 11:43:47  12/22/10 21:43:47  krbtgt/ADS.ORCORP.CA@ADS.ORCORP.CA

Samba automatically creates /etc/krb5.keytab entry for the computer UPN,
this patch makes gssd_refresh_krb5_machine_credential prefer it above
the SPNs if it is present.

The net result is that nfs client works automatically out of the box
if samba has been used to setup kerberos via 'net ads join' 'net ads
keytab create'

Tested using Windows Server 2003 R2 as the AD server.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/gssd.man
utils/gssd/krb5_util.c