[CentOS] Autofs - can you mount only certain home dirs?

Fri Aug 9 21:41:27 UTC 2013
Ljubomir Ljubojevic <centos at plnet.rs>

On 08/09/2013 08:30 PM, Les Mikesell wrote:
> Does autofs take completed control of directories mentioned in
> auto.master?   The examples with /home show that you can specify
> individual users instead of * and &, but even then it seems to take
> over the whole /home level so you can't see or add local subdirs.
>
> I have a small group of users/hosts where I would like to at least
> temporarily mix/match who is automounted or not.
>

I am not sure what you are asking, but automounts are only mounted when 
you try to access them. I created symlinks to a separate folder (once I 
access a mount) so when I try to open symlink autofs mounts it for a 
given amount of time.

path from auto.server: /autofsmounts/server/
folder that will be created: extra
symlink (created after "ls /autofsmounts/server/extra"):  /server/extra 
->  /autofsmounts/server/extra

ls /server/extra will mount the server:extra for x seconds (--timeout x ).

If you place symlinks where you need them, you can have consistent path 
accessible from file managers. Maybe you can apply access limitations on 
a symlink (location) or something?



-- 
Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

StarOS, Mikrotik and CentOS/RHEL/Linux consultant