4

I am trying to automount /home/users/<username>/secure for all users using AutoFS.

Naturally I would put down this line as a direct map:

/home/users/*/secure -fstype=nfs4,rw,sec=krb5p jupiter:/home/users/&

However according the documentation:

You cannot use the asterisk (*) wildcard in a direct map.

If I wanted to mount the entire home directory this would be easily done in an indirect map as follows:

* -fstype=nfs4,rw,sec=krb5p jupiter:/home/users/&

And the master file would have:

/home/users /etc/auto.home

But it seems that once I want to target a sub-directory of the wildcard, it is not really supported. At least I cannot find the right documentation for it.

Another way in which I was hoping to achieve this, is with an executable map, but it is unclear to me what the executable map should do for all the directories in /home/users/<username>/ other than secure. How should it signal that nothing should be mounted for those paths?

Currently I am using pam_mount to achieve this. However these are mobile workstations, that have intermittent access to the NFS server. With pam_mount, when the user logs in while the server is not accessible, the secure directory will not be mounted until logs out and logs in again. So therefore I am hoping autofs will be better.

d_inevitable
  • 209
  • 1
  • 6
  • 19

0 Answers0