Previous Table of Contents Next


In the following example, I create an indirect automount_map named auto_local in the org_dir domain for sun.COM. We enter two rows in the table, add the indirect map to the NIS+ auto_master table, and stop and restart the automounter.

oak% su
Password:
oak# nistbladm -c automount_map key=S value=S auto_local.org_dir.sun.COM.
oak# nistbladm -a key=openwin value=oak:/usr/openwin
auto_local.org_dir.sun.COM.
oak# nistbladm -a key=frame3.1 value=ash:/usr/local/frame3.1
auto_local.org_dir.sun.COM.
oak# niscat -v auto_local.org_dir.sun.COM.
openwin  oak:/usr/openwin
frame3.1  ash:/usr/local/frame3.1
oak# niscat -o auto_master.org_dir.sun.COM.
Object Name   : auto_master
Owner      : oak.sun.COM.
Group      : admin.sun.COM
Domain      : org_dir.sun.COM.
Access Rights : ----rmcdrmcdr---
Time to Live  : 12:Ø:Ø
Object Type   : TABLE
Table Type       : automount_map
Number of Columns   : 2
Character Separator :
Search Path      :
Columns          :
        [Ø]     Name          : key
               Attributes    : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE)
               Access Rights : ----------------
        [1]     Name          : value
               Attributes    : (TEXTUAL DATA)
               Access Rights : ----------------
oak# nistbladm -a key=/bin value=auto_local auto_master.org_dir.sun.COM.
oak# niscat -v auto_master.org_dir.sun.COM.
/bin auto_local
oak# ps -ef | grep automount
 root  131   1 16  21:18:47 ?      Ø:ØØ  /usr/lib/nfs/automount
 root  4Ø7 398 14  23:14:ØØ pts/3 Ø:ØØ grep automount
oak# kill -1 131
oak# /usr/lib/nfs/automount
oak#

Setting Up a Direct Map

You can set up a direct map in the same way that you set up indirect maps--using the NIS+ nistbladm command. The only differences are that, by convention, the direct map is named auto_direct and you use the complete pathname in the key field. By convention, all direct mounts are included in the map named auto_direct.

See the section "Setting Up Indirect Maps" earlier in the chapter for complete instructions.

The following example sets up a direct map named auto_direct--with one entry for automounting manual pages--and adds it to the auto_master map. At the end of the example, the automounter is stopped and then restarted.

oak% su
Password:
oak# nistbladm -c automount_map key=S value=S auto_direct.org_dir.sun.COM.
oak# nistbladm -a key=/usr/man value=-ro,oak:/usr/share/man
auto_direct.org_dir.sun.COM.
oak# niscat -v auto_local.org_dir.sun.COM.
/usr/man  -ro  oak:/usr/share/man
oak# niscat -o auto_master.org_dir
Object Name   : auto_master
Owner       : oak.sun.COM.
Group       : admin.sun.COM
Domain      : org_dir.sun.COM.
Access Rights : ----rmcdrmcdr---
Time to Live : 12:Ø:Ø
Object Type  : TABLE
Table Type      : automount_map
Number of Columns   : 2
Character Separator :
Search Path    :
Columns        :
        [Ø]     Name          : key
               Attributes    : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE)
               Access Rights : ----------------
        [1]     Name          : value
               Attributes    : (TEXTUAL DATA)
               Access Rights : ----------------
oak# nistbladm -a key=/- value=auto_direct auto_master.org_dir.sun.COM.
oak# niscat -v auto_master.org_dir.sun.COM.
/bin auto_local
/- auto_direct
oak# ps -ef | grep automount
 root  138   1 16  21:18:47 ?      Ø:ØØ  /usr/lib/nfs/automount
 root  412 398 14  23:14:ØØ pts/3 Ø:ØØ grep automount
oak# kill -1 138
oak# /usr/lib/nfs/automount
oak#

Setting Up the Master Map

When the NIS+ root master server is configured, the NIS+ auto_master map is created automatically. You do not need to create it as a separate step.

You do, however, need to provide an entry in the NIS+ auto_master map for each direct map and indirect map that you create.

The section "Setting Up Indirect Maps" contains information on how to edit the NIS+ auto_master map. That information is summarized here for your reference.

Follow these steps to add an entry to the NIS+ auto_master map:

1.  Display the names of the columns in the auto_master map by typing niscat -o auto_master.org_dir.domain-name. and then pressing Return.
2.  To add each entry, type nistbladm -a key=mount-pointvalue=map-name auto_master.org_dir.domain-name. and then press Return.
3.  Stop and restart the automounter. (Remember that you do not need to do this for Solaris 2.3 and later releases--just run the automount command.)

Administering NIS+ Automount Maps

The following sections describe how to modify entries in existing automount maps and how to delete entries from NIS+ automount maps.

Modifying NIS+ Automount Maps

You can use the -A option for nistbladm to force an overwrite of information in an existing NIS+ automount map.

The syntax for the nistbladm -A option follows. You must specify a value for each of the columns in the table.

nistbladm -A column= ... table-name.domain-name.

For NIS+ automount tables, the more specific syntax is the following:

nistbladm -A key= value= auto_name.org_dir.domain-name.

In the next example, the administrator typed key=bin instead of key=/bin for the auto_local entry in the auto_master table. When the system booted, the automounter displayed an error message informing the administrator that the name bin in the auto_master table needed to be changed to /bin.

This is how the administrator changed the entry using the nistbladm -A command:

oak% nistbladm -A key=/bin value=auto_local auto_master.org_dir.sun.COM.
oak%


Previous Table of Contents Next