1.2.6. Configuring NFS v4 with Kerberos
Obtain a Kerberos ticket for the admin user.
# kinit admin
The ipa-admintools package is not available for Red Hat Enterprise Linux 4. Consequently, you need to perform the following steps on the IPA server.
Add an NFS service principal for the client.
# ipa-addservice nfs/ipaclient.example.com
Retrieve the NFS keytab.
# ipa-getkeytab -s ipaserver.example.com -p nfs/ipaclient.example.com \ -k /tmp/krb5.keytab # klist -ket /tmp/krb5.keytab (to verify)
The Linux NFS implementation still has limited encryption type support. If your NFS server is hosted on a Linux machine, you may need to use the -e des-cbc-crc option to the ipa-getkeytab command for any nfs/<FQDN> service keytabs you want to set up, both on the server and on all clients. This instructs the KDC to generate only DES keys.
Copy the keytab from the server to the client.
# scp /tmp/krb5.keytab root@ipaclient.example.com:/tmp/krb5.keytab
On the IPA client, use the ktutil command to import the keytab.
# ktutil ktutil: read_kt /tmp/krb5.keytab ktutil: write_kt /etc/krb5/krb5.keytab ktutil: q
Add the following line to the /etc/sysconfig/nfs file:
SECURE_NFS=yes
Start the rpcgssd daemon.
# service rpcgssd start
The IPA client should now be fully configured to mount NFS shares using Kerberos credentials. Use the following command to test the configuration:
# mount -v -t nfs4 -o sec=krb5 ipaserver.example.com:/ /mnt