1

I have a NFS4 share running with krb5p.

I have no problems accessing it from CentOS clients, all that is required is:

yum install krb5-workstation
setup krb5 (edit krb5.conf, setup keytab)
systemctl enable nfs-secure.service && systemctl start nfs-secure.service
systemctl enable nfs-client.target && systemctl start nfs-client.target
mkdir /mnt/x
Add the following to fstab:
server.example.com:/srv/share/subdir /mnt/x nfs4 defaults,sec=krb5p,noexec,nosuid,_netdev,auto     0       0

This works great on CentOS, I've setup a dozen client hosts so far that way. However on Ubuntu, I get : mount.nfs4: an incorrect mount option was specified

I think the Ubuntu error is to do with nfs-secure.service however there seems to be no equivalent on Ubuntu that gets installed with NFS client ? (I am using Ubuntu 16.04.5 LTS).

UPDATE:

I have tried: systemctl enable rpc-gssd.service && systemctl start rpc-gssd.service

That launches OK:

# systemctl status rpc-gssd.service
● rpc-gssd.service - RPC security service for NFS client and server
   Loaded: loaded (/lib/systemd/system/rpc-gssd.service; static; vendor preset: enabled)
   Active: active (running) since Thu 2018-10-04 16:49:40 BST; 6min ago
  Process: 51689 ExecStart=/usr/sbin/rpc.gssd $GSSDARGS (code=exited, status=0/SUCCESS)
 Main PID: 51691 (rpc.gssd)
    Tasks: 1
   Memory: 516.0K
      CPU: 13ms
   CGroup: /system.slice/rpc-gssd.service
           └─51691 /usr/sbin/rpc.gssd

But Ubuntu just hangs when trying to mount ?

 # mount -v -t nfs4 -o defaults,sec=krb5p,noexec,nosuid,_netdev,auto server.example.com:/srv/dir/example /mnt/example
mount.nfs4: timeout set for Thu Oct  4 16:54:40 2018
mount.nfs4: trying text-based options 'sec=krb5p,addr=10.10.10.10,clientaddr=10.10.10.9'
# NOTHING ELSE HAPPENS.....
  • Have you configured /etc/default/nfs-common/ and then reloaded nfs-common? – sebasth Oct 4 '18 at 19:15
  • @sebasth is that a requirement on Ubuntu ? Never had to do that on CentOS ? Are you saying I need to set "NEED_GSSD=" in /etc/default/nfs-common ? But woudl that not be the same thing as systemctl enable rpc-gssd.service && systemctl start rpc-gssd.service ? – Little Code Oct 4 '18 at 21:41
  • NEED_IDMAPD and NEED_GSSD both probably should be turned on. I would expect Ubuntu NFS be configured via /etc/default/nfs-common as on Debian (the files likely had been removed if they weren't used/required). – sebasth Oct 5 '18 at 6:57
  • @sebasth unfortunatley no change with those options enabled. ;-( – Little Code Oct 5 '18 at 7:25
  • You restart nfs-common as well? You can also increase verbosity for mount by adding more -v options. – sebasth Oct 5 '18 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.