System Administration Guide: Network Services

ProcedureHow to Disable Autofs Browsability on a Selected File System

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

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

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


    automount:  files nis

    This entry shows 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 have precedence over the entries in the namespace, the +auto_master entry must be moved to follow /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 placement 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 becomes effective after running the automount command on the client systems or after a reboot.


    # /usr/sbin/automount