In one of my assignments on CentOS 7, I am trying to NFS mount /home directory from management node to client node. I have given the commands I have tried below.

I tried to disable firewall, but it's asking for password which I don't have, and so it didn't work. Then I made changes in the exports file as below, but nothing to my avail. PFB the commands I ran:

[user@node-1 ~]$ ssh -i ~/.ssh/key node-2
Last login: Wed Sep 19 12:56:36 2018 from
[user@node-2 ~]$ sudo mount -t nfs /home          
mount.nfs: access denied by server while mounting
[user@node-2 ~]$ exit
Connection to node-2 closed.
[user@node-1 ~]$ systemctl disable firewalld
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: Cloud User (user)
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
Failed to execute operation: Access denied
[user@node-1 ~]$ sudo vi /etc/exports

The changes made in the exports file are as:

/home 192.18.0.*(rw,sync,no_root_squash,no_all_squash)

And then I tried updating the changes but got another error

[user@node-1 ~]$ exportfs -ra
exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 13 
(Permission denied)
exportfs: can't lock /var/lib/nfs/etab for writing

Can anyone help me mount the /home directory from the management server to client server, please?


192.18.0.* is not a valid ip or subnet. Try instead.

  • Note: the - ip range belongs to Oracle Corporation. Don't use it unless you're a worker at oracle.
| improve this answer | |
  • calvin probably did not type the subnet correctly. I guess, it was meant to be – Hermann Sep 20 '18 at 7:43
  • Last login: Wed Sep 19 12:56:36 2018 from so it probably really is this subnet. – roaima Sep 21 '18 at 6:52

To check what are the allowed IP networks run this command in node-1:

$ showmount -e localhost

or this in node-2

$ showmount -e node-1

You should see the IP networks actually allowed to mount each of the NFS exported directories in node-1.

| improve this answer | |

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.