Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to serve certain files via NIS only to a group of clients and not to all of them? It's probably a very easy task but I'm searching for a while now and don't seem to find an answer. I'm also pretty new to the subject and not really sure for what to search.

So lets say I have one server (host1) that exports a directory via NFS. So the file /etc/exports looks for instance like this:


Now I want to serve a directory inside /usr/local to some client machines. So I edit the file /etc/auto.master on the NIS server and add the following line:

/usr/local/apps     auto.appXY

and I create a file auto.appXY with the following content:

appXY   -rw,hard,intr    host1:/usr/local/appXY

When I have now two clients


then only client1 will actually receive the content of /usr/local/appXY because only its IP address was used in /etc/exports. The problem is, that there will be nevertheless an empty directory apps mounted in /usr/local on client2. Which means means that I can't have a local directory called apps because its content will not appear.

So I read this answer:

How to prevent autofs from mounting over specific directories?

which describes a way of dealing with this by editing the /etc/auto.master file on each client. This might work but I was really hoping to find a server side solution.

So here again my question:

Can I configure my NIS server to serve a different auto.master file to different clients? Or can I in some other way realize to automount directories only on specific clients, so that on all the other clients nothing gets overmounted?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.