I'm working with a small to medium sized LAN and we have several servers and clients and using one NIS server to serve automount information to all the machines. So, some servers export certain directories and those directories get automounted everywhere. It all works really well but I'm reaching a point where I really would like to be able to control what directories get mounted on what machine. I can do this of course by editing the file /etc/exports and providing a netgroup or a stricter IP range. But then there will still be an empty directory that gets mounted on every machine and that overrides already existing directories.
So here is my (simplyfied) setup so far:
/etc/auto.master (on NIS server)
Code:
/home auto.home
/project auto.project
/usr/local/apps auto.apps #I want this happening only on certain clients
/etc/auto.apps (on NIS server)
Code:
appXY -wsize=8192,rsize=8192,proto=tcp host1:/usr/local/appXY
/etc/exports (on host1)
Code:
/usr/local @myAppGroup(fsid=0,ro,no_root_squash,async,no_subtree_check)
/etc/auto.master (on every client)
Now, the content of appXY will only be mounted on machines in myAppGroup. The proplem is that /usr/local/apps will be mounted everywhere and I can't have a local directory /usr/local/apps on one of the other machines, because it will get overmounted. I already read about a solution that suggested to edit the /etc/auto.master on the client machines so that overmounting doesn't happen. But this would require to make edits on every single client.
So is there a way to achieve this directly on the NIS server?
Bookmarks