Link to home
Start Free TrialLog in
Avatar of xander101998
xander101998

asked on

Winat scheduler problem

I'm trying to run a daily archiving routine using Winat.  This involves copying files from a Novell network onto a local hard disk.  However, I keep getting an "Access Denied" error message.  My account has administrator rights to the network and I've changed the "Log on As" option in Control Panel, Services, Schedule to my account but still no joy. The  command I type at the Winat command line is: C:\winnt\system32\arc.  ("arc" is the name of my archiving batch file.)

Any ideas why access is still denied??
Avatar of xander101998
xander101998

ASKER

Edited text of question
Edited text of question
Edited text of question
HI :)

What u can do is that use the net use command at the start of your batch file and then copy the files and then at the end delete the mapping. Here how it goes.

arc.bat

net use m: \\novell\volume\directory password
copy the files
net use m: /delete

Now make sure you must have Client Service for NetWare (Windows NT Workstation) or Gateway Service for NetWare (Windows NT Server) installed and running to connect to NetWare servers.

If it is not the same user name on the netware server then u can use /user:username in the above command to specify other username.

Hope it helps and gives u insight.

If Mujeeb's answer is not working for you, when you say "your account", do you mean the one you are logging on to the system with?
Sounds like you correctly set scheduler to run under an authorised account, but when you run the arc batch file, are you overwriting existing files on the local hard disk?  Could it be that some of the files you are archiving have the ReadOnly attribute set?  You can't blantantly overwrite them.  Does your batch file copy to a folder?  If so, be sure to include trailing slash character to indicate that this is a folder, not a file.
Hi :)

Could u please specify the reason for rejecting the answer so that we can help u further.
sorry mujeeb,

solution worked partially after trying different conbinations of command, but reaches a point when it asks fro a directory password which is non-existant. Leaving out this parameter from the command line results in an "unrecognised server" error message - the server\volume i've specified does,however, exist.
Also check if your account has the Log On As Service privilegde.. (UserManager / Policies / User Rights)
Hi :)

Can u  map to the directory from explorer or from dos prompt. Also the machine from which u are trying is it winnt server or workstation, and do u have admin right in the machine or not. Also do u have nwlink protocol and the appropiate service installed in case of server or workstation.

Please give informtion and the exact scenario in which u trying to run the commands.
Hi Mujeeb

In answer to your queries:

- I can map to the dir from Explorer
- my machine is a workstation with admin rights
- csnw loaded and configured

scenario:

i've got an archiving batch file residing on my hard disk (C:\winnt\system32\arc.bat) whose purpose is to copy file from a directory on a network drive to a directory on my hard disk and also to a backup directory on the same network drive.  Currently, running the command "C:\winnt\system32\arc", with the alterations you mentioned made to the batch file, first gives a prompt for a password, then an access denied error message after hitting <RETURN> at password prompt. ( I am already logged on and can see the relevant drive so there should be no need for a password)
Hi :)

When u just use net use m: <path> to map then NT sends your username and password to the server u are trying to map, if they are the same then it maps and if the user name is the same and password is not then it will prompt u to enter the password. This what happens.

Could u try one thing please. That run the batch file as it is to see whether it goes successfully or not. Remove any mappings if u have and just simulate as it will run under the at command.

If this goes fine then at least it will rule out the possibility of not having enough rights on the source and destination. Also u will come to know that the net use command is mapping the drive or not.

Could u please try the above suggestion and come back with the findings. If the above works fine then the same should work from the at command if u are starting the schedule serive under the same account.
batch file runs ok locally  without mapping, problem arises when reference to any network drive is made.
Hi :)

When i said that remove any previous mapping, i meant that u do not map to the directory and run your batch file which has the net use map command and see if it runs fine and connects and backups and disconnects as i suggested before.

If this works then the same should work fine when u schedule it.

If the batch file do not work normaly then please post the error u get at each stage of the batch file.

(I assume u are using the correct frame type since u said earlier that u can map to the driectory and can see the files.)
batch works fine outside of scheduler, once included in the "at" or "winat" command line it fails to work.  Running it through Winat give the password prompt, then a "system error 5 hs occured" error message after returning through password prompt.
Hi :)

Is the schedule service is still run under the user account which has access to the directory in the novell. If not then this is the reason why the password does not work. Because NT is trying to connect to the novell directory with the account under which the schedule is running and using the password which is supplied by u in the command (i hope u are not typing password literaly as i suggested before, i meant by password that u enter the password of the account).

Do one thing make the schedule service run under administrator account and change the net use command and add the /user:username with the password. the new syntax would be

net use m: \\novell\volume\directory /user:mujeeb okidoki <- this is the password
your copy commands
net use m: /delete

The above means that when the command will run it will run under the context of the administrator account and will map to the directory using the username and password supplied by u in the net use command. If everything is fine then it should work and u should not have any problem.

Try this and let me know.
Hi :)

Any progress on your side. Problem solved or not.
ASKER CERTIFIED SOLUTION
Avatar of jancape
jancape
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial