System Administration Guide, Volume 3

How to Disable Autofs Browsability on an NFS Client

In this example, browsability of the /net directory is disabled. The same procedure can be used for /home or any other autofs mount points.

  1. Check the automount entry in /etc/nsswitch.conf.

    For local file entries to take precedence, the entry in the name service switch file should list files before the name service. For example:


    automount:  files nisplus

    This is the default configuration in a standard Solaris installation.

  2. Check the position of the +auto_master entry in /etc/auto_master.

    For additions to the local files to take precedence over the entries in the name space, the +auto_master entry must be moved below /net:


    # Master map for automounter
    #
    /net    -hosts     -nosuid
    /home   auto_home
    /xfn    -xfn
    +auto_master
    

    A standard configuration places the +auto_master entry at the top of the file. This prevents any local changes from being used.

  3. Add the -nobrowse option to the /net entry in the /etc/auto_master file.


    /net     -hosts     -nosuid,nobrowse 
    
  4. On all clients: run the automount command.

    The new behavior takes effect after running the automount command on the client systems or after a reboot.


    # /usr/sbin/automount