Technical Notes |
|
If your NFS network is configured to use NIS (Network Information System) for network naming and administration, you can use NIS login scripts to automatically map NFS network drives for users who are running the Reflection NFS Client. Drives mapped in this manner can be customized per user and are centrally administered from the NIS server. This technical note explains how to configure automatic drive mapping on a Solaris 8 host configured for NIS.
Note: This technique can also be used if NIS is running on a non-Solaris host configured for NIS; however, this note specifically addresses configuration in the Sun Solaris environment.
This technical note describes how to configure automatic NFS drive mapping when using Reflection NFS Client to connect to a Solaris 8.
The NIS logon script map file is a text file containing user names (keys) paired with NFS drive mappings (values).
This file is not a standard NIS configuration file, so you must create it. By default, Reflection NFS assumes that the NIS login script map file is named pcscript. This naming convention is not required; however, if you decide to give the file a different name, you must update the name specified on the NIS tab of the Reflection NFS Client Properties dialog box for each NFS client installation. For information on using the XML export/import feature to configure Reflection NFS Client installations, see Technical Note 1816.
Each line of the pcscript text file contains four possible values: user name, UNC path, drive letter, and additional groups.
Syntax: <user name> <UNC path>[:<drive letter>] [<additional groups>]
There are three types of user names that can be used in the pcscript file:
The UNC path is the path to the directory you want mapped.
If a drive letter is specified, the mapped drive is mapped to the indicated letter. If no drive letter is specified, the first available drive letter is used.
Additional user groups, containing additional drive mappings, may be called. Drives specified in the additional groups will be also be mapped for this user. See example below.
The following is a sample pcscript file.
#----------------------------------------------------------# default user connections#----------------------------------------------------------default \\mars\users\public#----------------------------------------------------------# individual user connections#----------------------------------------------------------Ben \\mars\users\BenSusan \\earth\users\Susan:kDanny \\mars\users\Danny:g \\pluto\users\danny Linda \\mars\users\Linda Engineering#----------------------------------------------------------# user groups#----------------------------------------------------------Engineering \\mars\rover \\jupiter\lander#---------------------------------------------------------- |
This file does the following:
You can create the pcscript text file on your host using a text editor such as VI, or you can create the file locally in Microsoft Notepad, use the Reflection NFS ASCII file translation feature to convert the file to UNIX format, and then transfer the file to your host.
Save the file to the /etc directory.
Before the NIS logon script can be used, the pcscript file must be compiled using the NIS Makefile.
Follow the steps below to edit /etc/Makefile.
all: passwd group hosts ipnodes ethers networks rpc \ services protocols netgroup bootparams aliases \ publickey netid c2securenetmasks timezone \ auto.master auto.home auto.home2 auth.attr \ exec.attr prof.attr user.attr audit.user \ auto.group pcscript |
pcscript.time: $(DIR)/pcscript -@if [ -f $(DIR)/pcscript ]; then \ sed -e "/^#/d" -e s/#.*$$// $(DIR)/pcscript \ | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/pcscript.byuser; \ touch pcscript.time; \ echo "updated pcscript"; \ if [ ! $(NOPUSH) ]; then \ $(YPPUSH) pcscript.byuser; \ echo "pushed pcscript"; \ else \ : ; \ fi \ else \ echo "couldn't find $(DIR)/pcscript"; \ fipcscript: pcscript.time$(DIR)/pcscript:# New pcscript ends here |
Use the following UNIX ypcat command to verify that the changes to the Makefile worked.
ypcat -k pcscript.byuserSample ypcat response:
bluebell% ypcat -k pcscript.byuserDefault Default \\mars\users\defaultBen Ben \\mars\users\benSusan Susan \\earth\users\susan:kDanny Danny \\mars\users\danny:g \\pluto\users\dannyLinda Linda \\mars\users\linda EngineeringEngineering Engineering \\mars\rover \\jupiter\lander |
Navigate to the Reflection NFS Network Control Panel and enable NIS Logon Script Processing. You will then need to reboot your machine (or simply "close all programs and log on as a different user?") to see the logon script run.
Follow the steps below to enable NIS login script support in Reflection NFS Client.
Note: These steps assume that NIS support has already been enabled in Reflection NFS. For steps to enabe NIS support in Reflection NFS Client, see the Reflection NFS Client help.