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#
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#
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:
The following sections describe how to modify entries in existing automount maps and how to delete entries from 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 |