[Samba] How can Windows 2000 mount a share as a service?

Collen Blijenberg <MLHJ> systeembeheer at hermanjordan.nl
Sat Jul 10 09:52:37 GMT 2004


Here is an wild idea, why don't you make that service login as an user
(there is a way,(in services)to make your service run as user XXXXX.)
combine that with a login script, or even a home drive mapping, and your
service should have a mapped drive....

but this is theoretical, never tryed it for real..
we have an update service running on the machines, that distrebute file 
and register updates for our
work stations, and it also uses a mapped drive, and it works fine..
at this service of our, is also executed as a differend special user...

dunno... it's not beautyfull, but hey it works for us...

Greets

Collen Blijenberg <MLHJ>


Malcolm Baldridge wrote:

>I've asked every M$ expert I know, trolled through M$ TechNet, experimented
>with SRVANY/INSTSRV login scripts which hard-code username/passwords to
>login to a Samba 2.2.8a SMB server.  I've experiment with and without the
>"Allow service to interact with Desktop" switch turned on.
>
>I am stuck. :(   I can find no way to mount a share as a service, so that
>IIS can serve web-pages from a shared content directed located on a network
>drive.
>
>When I run my login script when I'm logged in as the Administrator or
>another user, the script works fine.  The share's mounted and available as
>the specified drive letter specified in the script.
>
>I'm using just the standard "net use" as follows:
>
>net use z: \\192.168.0.1\Web mypassword /user:webuser
>
>I've fiddled with adding a domain name to the user, to no avail. I've
>experimented with using the samba server's "Netbios" name as well as DNS
>name, to no avail.
>
>The script only seems to work when SOMEONE is logged into the machine.  When
>it's run as a service, no dice.  It just fails with a single digit error
>code (5, I think).  The error is opaque and non-descriptive.  It's as if SMB
>mounting was specifically prohibited by the OS at some internal bowel juncture.
>
>This is insane.  Surely, people running web-server clusters behind load
>balancers don't manually synchronise their content!  My web application
>accepts user-uploaded files, so I can't use the "manual resync" method
>anyway.  The upload area needs to be shared by all web-server members.
>
>There must be a solution for this very common requirement.  I don't want or
>need a "SAN" block-device-level solution, I want a file-level solution.
>
>If anyone can share some ideas or experise, I would be very grateful.  This
>must be a solved problem somewhere.
>
>=MB=
>  
>



More information about the samba mailing list