Score:1

Can't mount NFSv4 with Kerberos from a Linux client to a FreeBSD server

cn flag
hjf

I'm trying to set up NFSv4 with Kerberos. The server is FreeBSD 13.0-RELEASE and the client is Ubuntu 20. I have the Kerberos part running and I can automaatically get a ticket on login for my user, and SSH into the server while being authenticated via Kerberos. So I'm confident that my Kerberos setup is correct so far.

But when I try to mount NFSv4 shares, I get the following three errors at once:

# mount -vvvv -t nfs4 -o sec=krb5 servidor:/ /mnt

mount.nfs4: timeout set for Tue Nov  2 00:54:36 2021
mount.nfs4: trying text-based options 'sec=krb5,vers=4.2,addr=10.42.42.2,clientaddr=10.42.42.119'
mount.nfs4: mount(2): Invalid argument
mount.nfs4: trying text-based options 'sec=krb5,vers=4.1,addr=10.42.42.2,clientaddr=10.42.42.119'
mount.nfs4: mount(2): Permission denied
mount.nfs4: trying text-based options 'sec=krb5,vers=4.1,addr=fe80::215:17ff:fe56:d754,clientaddr=::'
mount.nfs4: mount(2): Input/output error
mount.nfs4: mount system call failed

First error is "Invalid argument", last is "Input/output error". Not sure how to go about debugging those.

The "Permission denied" error I'm not sure if it's due to Kerberos or something else.

showmount -e servidor shows that the exports exist (at least for NFSv3). Here's my exports file:

/tera/shared -alldirs
/usr/home -alldirs
V4: /tera/shared -sec=krb5,krb5i
V4: /usr/home -sec=krb5,krb5i

It's my understanding that this should export everything, to any IP on NFSv3 and to kerberos-authenticated clients for NFSv4.

Both machines have a nfs/hostname@REALM key in their keytab (also tried with nfs/hostname.fqdn@REALM and host/hostname@REALM, etc).

de flag
start `rpc.gssd` in foreground more and check the output during the mount. This might give you an indication what's going wrong.
cn flag
hjf
I've been trying that but I don't get much useful info: ```inotify event for clntdir (nfs/clntb) - ev->wd (22) ev->name (info) ev->mask (0x00000200) inotify event for clntdir (nfs/clnta) - ev->wd (21) ev->name (krb5) ev->mask (0x00000200) inotify event for clntdir (nfs/clnta) - ev->wd (21) ev->name (gssd) ev->mask (0x00000200)```
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.