SUMMARY: Automount with PC-NFS?

From: Elmar Kurgpold (ekurgpol@Law.USC.EDU)
Date: Wed Oct 12 1994 - 00:46:25 CDT


Sorry all, for the late summary, I've been out for a while...

There is no real way to accomplish automounting the way we all know and
love on our Suns (although that was not my question), but you can take
advantage of the auto.home NIS map with the command "net use e: $HOME".
Apparently, there are no other maps that you can use with PC-NFS. See the
attached summary for the full answer, and a nifty script that may help
also. I have NOT been able to verify this myself-- however, all of the
responses either agreed with it or were asking for the summary.

Thanks to...
Henryk.Michalec@solidex.krakow.pl
Mr T Crummey (DIJ) <tom@sees.bangor.ac.uk>
nrd@lenti.med.umn.edu
Behzad Fazel <fazelb@nyserv01.gsam.gs.com>
Richard Skelton <rich@brake.demon.co.uk>

Here is my original question:
/////////////////////////////

I heard once that you could take advantage of an automount home NIS map
on a PC using the %HOME% variable or something similar. I can't find
this in the documentation or in the summaries. I'm using PC-NFS 5.1 with
SunOS 4.1.3, but would be interested in any information on this topic.

And here is the summary that was posted previously (but not archived)
/////////////////////////////////////////////////////////////////////

---------- Forwarded message ----------
Date: Sun, 2 Oct 1994 11:32:39 -0500 (CDT)
From: nrd@lenti.med.umn.edu
To: ekurgpol@Law.USC.EDU
Subject: Re: Automount with PC-NFS?

I had this in my mail archives.

Forwarded message:
>From sun-managers-relay@ra.mcs.anl.gov Wed Mar 2 05:28:06 1994
Date: Tue, 01 Mar 1994 14:39:06 -0500
From: Behzad Fazel <fazelb@nyserv01.gsam.gs.com>
Reply-To: Behzad Fazel <fazelb@nyserv01.gsam.gs.com>
Subject: PC-NFS mounting solution
To: sun-managers@eecs.nwu.edu

Thanks to all of the individuals who responded. Several people requested me to
summerize.

The best solutions that apply to our environment, require no batch file, and no
modification to autoexec.bat file are from

Michael Myers (mmyers@willamette.edu),
Phil Race (Phil.Race@uk.sun.com),
Tom Crummey (tom@sees.bangor.ac.uk),
Jack Mayo (mayojoh@ac.com)
Paul Henninger (paul.henninger@cfsmo.honeywell.com)

All I have in drives.bat to mount users home directory is:
                       net use e: $HOME

This requires having every users's home directory in auto.home (NIS map).

I find also this script from Paul very helpful.
*****************
phj06@bk.dk (Paul Hostrup-Jessen)

1) You make sure that the PC mounts at least one Sun file system where it
   can find all the necessary files. This should be a standard setting on all
   PCs and common to all users.

   For example, add "NET USE D: server/files" to the AUTOEXEC.BAT file on
   a line after the PC/NFS software has been loaded. Make sure that the
   mounted file system is in the PATH statement, too.

2) Create a LOGIN.BAT file which looks a bit like the following one. When
   the user executes "LOGIN" the Sun-system will verify if the user has a
   valid login and if so automatically mount the user's prefered file systems
   and printers. If not, a message will warn the user. You can also create a
   message-of-the-day file (the last line) if you want too. Create the
   necessary subdirectories unless you wish to have everything in the same
   main directory:

------------------------------------------------------------------------------
@echo off
if "%LOGIN%"=="" goto no_user
Echo Unmount all drives/printers
Echo ==========================
Set Login=
Set User=
Set What=
Echo .
Echo ==========================================================================
:no_user
p:\nfsbat\WHAT S "Enter username:"
SET USER=%WHAT%
NET NAME %USER% *
Echo ==========================================================================
if errorlevel 1 goto error
if not exist P:\user_set\%USER%.bat goto error
call p:\user_set\%USER%.bat
goto userdone
:userdone
SET LOGIN=YES
NET USE
goto exit
:error
echo "Error: Unknown User [%USER%], No batch file - seek assistance"
Echo ==========================================================================
:exit
listener
more < p:\nfsbat\motd
-------------------------------------------------------------------------------

The user's personal batch file (USER.BAT) will look something like this:

-------------------------------------------------------------------------------
@echo off
Net Use D: server:$HOME
Net Use E: server:/programs
Net Use LPT2: pluto:/ps1 /fmt=p
-------------------------------------------------------------------------------
 Paul Hostrup-Jessen
System Administrator

Bruel & Kjaer A/S
DK-2850 Naerum
DENMARK
**************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:11 CDT