i tried to setup nfsv4 server and client on centos7.3,both server(ark-centos7-ker ),client(ark-centos-smb4) are joined to AD domain by realm command,AD domain users could log in to centos server
run kinit could get kerberos tickets,but mount nfsv4 export from client failed see following

[arkadmin@QA.ARKIVIO.COM@ark-centos-smb4 ~]$ sudo mount -t nfs4 -o sec=krb5 ark-centos7-ker.qa.arkivio.com:/export/nfs1 /nfs4-mnt-dir
mount.nfs4: access denied by server while mounting ark-centos7-ker.qa.arkivio.com:/export/nfs1  

server side nfsv4 exports setting

[root@ark-centos7-ker ~]# exportfs -v
/export/nfs1    <world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys:krb5:krb5i:krb5p,rw,secure,no_root_squash,no_all_squash)
/export/nfs2    <world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys:krb5:krb5i:krb5p,rw,secure,no_root_squash,no_all_squash)

please give some suggestion,i know it's complicated in Kerberos,nfsv4 settings


figured it out,re-join domain by realm command for both client,server

realm join --user=admin@QA.ARKIVIO.COM --user-principal=nfs/ark-centos-smb4.qa.arkivio.com@QA.ARKIVIO.COM QA.ARKIVIO.COM

it will create relevant nfs/* credentials for client,server then mount nfsv4 exports with sec=krb5 option succeeded

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.