Koozali.org: home of the SME Server

SMB Drive Mapping fail when scheduled

vicktheviking

SMB Drive Mapping fail when scheduled
« on: February 17, 2004, 01:02:26 AM »
SMB Drive Mapping fail when scheduled  ( post #1)

Hi Anyone who may be able to help

I am experiencing some strange behaviour whilst attempting to map a network drive to a Samba share. Not sure if you can shed any light on the matter.

A script, which maps a drive letter on a W2K server to an I-Bay (Samba Share) on the e-smith server, runs just fine interactively (ie from the Windows command prompt) but seems to fail via Windows Scheduler.

The commands are listed below.

Any ideas would be appreciated as I am at a total loss :-(

Thanks
Phil

##########################################

NET USE Q: /DELETE
NET USE Q: \\server\share /USER:samba_domain\user password
.
.
Do some file moving stuff
.
.
NET USE Q: /DELETE

###########################################

oregonbob

SMB Drive Mapping fail when scheduled
« Reply #1 on: February 17, 2004, 05:32:02 AM »
I have seen this behavior on scheduled jobs when the intended user is logged out, or another user logs in. Also seen it when admin logs into local domain (the PC) rather than the Active Directory domain.

I think somewhere in setting up (properties) scheduled jobs where you can specify "Rus as" user and password. Try logging in a a user you know the script works OK, then schedule a job for only a minute or to in future, sit there and watch to see if it runs. After you setup "Run as" you can try simplifying your NET USE command so it is only
NET USE Q: \\server\share