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...
Mr T Crummey (DIJ) <>
Behzad Fazel <>
Richard Skelton <>

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)
To: ekurgpol@Law.USC.EDU
Subject: Re: Automount with PC-NFS?

I had this in my mail archives.

Forwarded message:
>From Wed Mar 2 05:28:06 1994
Date: Tue, 01 Mar 1994 14:39:06 -0500
From: Behzad Fazel <>
Reply-To: Behzad Fazel <>
Subject: PC-NFS mounting solution

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

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

Michael Myers (,
Phil Race (,
Tom Crummey (,
Jack Mayo (
Paul Henninger (

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.
***************** (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 ==========================================================================
p:\nfsbat\WHAT S "Enter username:"
Echo ==========================================================================
if errorlevel 1 goto error
if not exist P:\user_set\%USER%.bat goto error
call p:\user_set\%USER%.bat
goto userdone
goto exit
echo "Error: Unknown User [%USER%], No batch file - seek assistance"
Echo ==========================================================================
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

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