NFS share is not getting mounted when services denied
in /etc/hosts.deny file
Environment
- Red Hat Enterprise Linux (RHEL) 7
- NFS version 3
Issue
- Unable to mount NFS share as version=3 getting 'permission denied error message' but nfs4 works fine
- showmount -e is showing 'clnt_create: RPC: Port mapper failure - Authentication error'
- rpcinfo -p <nfs-server> is showing 'rpcinfo: can't contact portmapper: RPC: Authentication error; why = Client credential too weak'
Resolution
- Check if any daemon is denied in /etc/hosts.deny file
#
cat /etc/hosts.deny
ALL:
ALL
- If tcp_wrapper is used in your environment make an entry of mountd and rpcbind in /etc/hosts.allow file
#
cat /etc/hosts.allow
sshd:
ALL
rpcbind:
ALL
mountd:
ALL
Root Cause
- As every daemon was blocked/denied hence there was an authentication error and unable to mount nfs share
Diagnostic Steps
- Getting permission denied while trying to mount share as version=3
[root@dhcp4-54 ~]# mount -t nfs -o vers=3 dhcp4:/nfs /mnt/
mount.nfs:
access denied by server while mounting dhcp4:/nfs
- showmount -e throws below authentication error
[root@dhcp4-54 ~]# showmount -e dhcp4
clnt_create:
RPC: Port mapper failure - Authentication error
- rpcinfo shows 'Client credential too weak'
[root@dhcp4-54 ~]# rpcinfo -p dhcp4
rpcinfo:
can't contact portmapper: RPC: Authentication error; why = Client credential
too weak
No comments:
Post a Comment