I'm trying to understand Kerberos and getting confused with the service principals. Assume I wanna access a NFS share secured by Kerberos.
I have the following three different nodes:
- A Client machine (with a user called test)
- KDC (AS/TGS)
- NFS Server
Now the KDC contains the principal database with the user called test. Further the KDC contains also a nfs/DOMAINNAMEFROMNFSSERVER principal. This principal is also shared with the NFS server using a keytab. In order to establish a kerberized nfs session, the user test is requesting a TGT from the KDC.
But why all the examples in the internet tell that the Client machine needs also a keytab which should contain the nfs/DOMAINNAMEFROMNFSSERVER principal?
I understand that the service principal need only be present in the KDC database and directly on the NFS server (using a keytab). Could somebody please clarify why the keytab need also be present on the Client?
Thanks in advance for your help!
Refer: man rpc.gssd, it contains the answer the question in detail. btw, the principal on the client can be different than nfs/@REALM.
Snip from the man page: