How 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. Verify the search order for the automount naming services.

    The config/automount property in the name-service/switch service shows the search order for the automount information.

    # svcprop -p config svc:/system/name-service/switch
    config/value_authorization astring solaris.smf.value.name-service.switch
    config/printer astring user\ files
    config/default astring files\ nis
    config/automount astring files\ nis

    The last entry shows that local automount files are searched first and then the NIS service is checked. The config/default entry specifies the search order for all naming information not specifically listed. If you are using the LDAP naming service, the config/automount property in the name-service/switch service shows ldap in the search order for the automount information.

    # svcprop -p config svc:/system/name-service/switch
    config/value_authorization astring solaris.smf.value.name-service.switch
    config/printer astring user\ files\ ldap
    config/default astring files\ ldap
    config/automount astring files\ ldap
  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 name space, the +auto_master entry must be moved to follow /net.

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

    A standard configuration places the +auto_master entry at the top of the file, which 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