# Kerberized NFS without a keytab file

## Ressy

I'm having trouble mounting a kerberized NFS (version 3) share on Gentoo that works OK with CentOS on the same client.  I can mount other NFS shares (with NFS option sec=sys), and I can get kerberos tickets (using kinit) for my own username.  But, when I try to put it all together (with sec=krb5), it won't mount.

The problem seems to be a missing krb5.keytab file.  CentOS complains about it with warnings, but continues anyway, as the man pages say it should.  Faced with the same situation, Gentoo throws errors in place of warnings and refuses to even try.  Both have the same krb5.conf and relevant fstab lines.  I've tried explicitly setting verify_ap_req_nofail to false, but it doesn't help.  (Continuing with warnings is supposed to be the default anyway, from what I understand.)  Any suggestions?

verbose rpc.gssd output On CentOS:

```

Using keytab file '/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab

'/etc/krb5.keytab'

ERROR: No usable keytab entries found in keytab '/etc/krb5.keytab'

Do you have a valid keytab entry for nfs/<your.host>@<YOUR.REALM> in keytab

file /etc/krb5.keytab ?

Continuing without (machine) credentials - nfs4 mounts with Kerberos will fail

destroying client clnt5

handling krb5 upcall

Using keytab file '/etc/krb5.keytab'

WARNING: Failed to obtain machine credentials for connection to server

netapp.example.com

doing error downcall

handling krb5 upcall

Using keytab file '/etc/krb5.keytab'

WARNING: Failed to obtain machine credentials for connection to server

netapp.example.com

doing error downcall

```

verbose rpc.gssd output on Gentoo:

```

beginning poll

destroying client clnt11

handling krb5 upcall

Full hostname for 'netapp.example.com' is 'netapp.example.com'

Full hostname for 'localhost' is 'localhost'

No such file or directory while getting keytab entry for 'root/localhost@AD.EXAMPLE.COM'

No such file or directory while getting keytab entry for 'nfs/localhost@AD.EXAMPLE.COM'

No such file or directory while getting keytab entry for 'host/localhost@AD.EXAMPLE.COM'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

No such file or directory while getting keytab entry for 'root/localhost@example.com'

No such file or directory while getting keytab entry for 'nfs/localhost@example.com'

No such file or directory while getting keytab entry for 'host/localhost@example.com'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: gssd_refresh_krb5_machine_credential: no usable keytab entry found in keytab /etc/krb5.keytab for connection with host netapp.example.com

ERROR: No credentials found for connection to server netapp.example.com

doing error downcall

handling krb5 upcall

Full hostname for 'netapp.example.com' is 'netapp.example.com'

Full hostname for 'localhost' is 'localhost'

No such file or directory while getting keytab entry for 'root/localhost@AD.EXAMPLE.COM'

No such file or directory while getting keytab entry for 'nfs/localhost@AD.EXAMPLE.COM'

No such file or directory while getting keytab entry for 'host/localhost@AD.EXAMPLE.COM'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

No such file or directory while getting keytab entry for 'root/localhost@example.com'

No such file or directory while getting keytab entry for 'nfs/localhost@example.com'

No such file or directory while getting keytab entry for 'host/localhost@example.com'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: gssd_refresh_krb5_machine_credential: no usable keytab entry found in keytab /etc/krb5.keytab for connection with host netapp.example.com

ERROR: No credentials found for connection to server netapp.example.com

doing error downcall

handling krb5 upcall

Full hostname for 'netapp.example.com' is 'netapp.example.com'

Full hostname for 'localhost' is 'localhost'

No such file or directory while getting keytab entry for 'root/localhost@AD.EXAMPLE.COM'

No such file or directory while getting keytab entry for 'nfs/localhost@AD.EXAMPLE.COM'

No such file or directory while getting keytab entry for 'host/localhost@AD.EXAMPLE.COM'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

No such file or directory while getting keytab entry for 'root/localhost@example.com'

No such file or directory while getting keytab entry for 'nfs/localhost@example.com'

No such file or directory while getting keytab entry for 'host/localhost@example.com'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: No such file or directory while beginning keytab scan for keytab 'FILE:/etc/krb5.keytab'

ERROR: gssd_refresh_krb5_machine_credential: no usable keytab entry found in keytab /etc/krb5.keytab for connection with host netapp.example.com

ERROR: No credentials found for connection to server netapp.example.com

doing error downcall

destroying client clnt10

destroying client clntf

exiting on signal 2

```

I've replaced the hostnames in these logs with example ones, but you get the idea.  Oh, and this is with kernel 2.6.32-gentoo-r7 and net-fs/nfs-utils 1.1.4-r1.

----------

