On Fri, 2002-08-02 at 11:50, Vicky Clarke wrote:> I'm seeing errors accessing samba shares accompanied by the message
"The
> local device name is already in use" fairly frequently on several
machines
> around our building. It doesn't seem to happen with NT shares. Our NT
logon
> script executes a 'net use' command to map the Samba share as a
network
> drive; is this just a symptom of a share already being manually mapped on
> that machine, or could there be other reasons for it?
One way to tell is to use a delete before doing the map. I always do
this just to avoid any errors and to make sure that if a drive mapping
was changed by the user that it will revert back to its proper setup.
Also use of the /persistent switch can assist as well.
Example logon batch file:
--------------------------
@echo off
@if not "%ECHO%"=="" echo %ECHO%
set NETSW=/yes
if "%OS%"=="Windows_NT" set NETSW=/persistent:no %NETSW%
if exist x:*.* net use x: /delete
net use x: \\servername\sharename %NETSW%
--------------------------
Notice the test to see of the drive letter is in use (and its deletion
if it exists) before creating the map. And that the variable will make
the map non-persistent with NT class OS's, as well as supply the
"/yes"
argument for DOS/Win3.x/Win9x clients.
Chris
--
'Nix MS - Just Say .NyET