Operating System - Linux
1753326 Members
4748 Online
108792 Solutions
New Discussion юеВ

Re: NFS (and NIS) with netgroups

 
Matt Sears
Occasional Advisor

NFS (and NIS) with netgroups

Greetings,

I am trying to mount a share from a client listed in a netgroup on the server and I keep getting "Permission denied".

SERVER (lmvm1)
--------
cat /etc/netgroup
my_netgroup (Config387VM3,,NIS_DOMAIN)

cat /etc/exports
/mnt/psv2/my_nfs1/ @my_netgroup(rw,async,no_root_squash)

showmount -e
/mnt/psv2/my_nfs1 @my_netgroup

CLIENT (Config387VM3)
--------
# mount -t nfs lmvm1:/mnt/psv2/my_nfs1/ /mnt/1
mount: lmvm1:/mnt/psv2/my_nfs1/ failed, reason given by server: Permission denied



The man page for "netgroup" states:
"The Linux libc5 does not query the /etc/netgroup file directly, it only querys the NIS server for the groups".

I took that to mean netgroups would not work without setting up a NIS server, so I configured the NFS server as a NIS server as well. I changed the /var/yp/Makefile to build the netgrp database. I'm fairly confident that the communication between the NIS client and server is working appropriately since a 'ypcat passwd' on the client is reading the servers passwd file.

When I export the share to the world (*) or the specific client (Config387VM3), the mount succeeds. Can anyone help me figure out why it 's not working when the client is specified in a netgroup?

Thanks.


2 REPLIES 2
Matt Sears
Occasional Advisor

Re: NFS (and NIS) with netgroups

Still not sure what is going on, but now it seems to be working. The last thing I had done was to make sure I could mount by exporting it to the specific client (changing /etc/exports to share out to Config387VM3). On the client I mounted successfully and submitted this thread. After that I killed rpc.mountd on the server, changed /etc/exports to share out to the netgroup again, and restarted rpc.mountd in debug mode (rpc.mountd -F -d all). Finally, on the client, I unmounted and then remounted, it succeeded. Hmmm.
Matt Sears
Occasional Advisor

Re: NFS (and NIS) with netgroups

SOLVED:
I discovered that the client was not listed in the servers /etc/hosts file. After adding it and restarting the network, I could mount with the client specified through a netgroup.