Default Autofs Behavior With Name Services
At boot time, autofs
is invoked by the service svc:/system/filesystem/autofs
and autofs
checks for the master auto_master
map.
Autofs uses the name service ordering specified in the config/automount
property of the svc:/system/name-service/switch
service. If the config/automount
property is not defined, then the config/default
property is used. If NIS is selected and autofs
cannot find a map that autofs can use, but does find a map name that contains one or more underscores, the underscores are changed to dots to allow traditional NIS file names to work. Then autofs
checks the map again. For a name service switch setting of automount: files nis ldap
, maps would be found as shown in the following figure.
How Autofs Uses the Name Service

The screen activity for this session would resemble the following example.
$ grep /home /etc/auto_master /home auto_home $ ypmatch dollyp auto_home Can't match key dollyp in map auto_home. Reason: no such map in server's domain. $ ypmatch dollyp auto.home diskus:/export/home/diskus1/&
If files
is selected as the name service, all maps are assumed to be local files in the /etc
directory. Autofs interprets a map name that begins with a slash (/
) as local regardless of which name service autofs
uses.