Discussion Locked

Net use

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

When I run a cron that has a net use to an unit of another server, it generate the 1312 error.
I don't know what happend

12 replies

by paulagarron

I put processes to execute in a NT Server, by command AT, I specified the time to be executed and the path of the file to be execute, but this file has a net use to an unit of another server, then it generate me the 1312 error, the sintaxis is Net use I: //server.
I'm trying to copy files from a server to another, but I don?t know what's wrong.

by paulagarron

When I talk about cron, I'm talking of files with diferent instruccions, sometimes uses to backup files, so NT server let us put processes to execute in a time especified, by AT command you can specify the time to be executed and then path of file to be executed, in this file I put a net use like NET USE I:\\Unit_Server, this from another server, to copy information to actual server.

by joseph moore

You can have problems with authentication when you schedule jobs with AT that have to go across a network. The scheduled jobs ran by AT all run under the machines Local System account; this account does NOT have any access rights across your network.
So, if you set up an AT job on \\SERVER2 to map a drive to a shared folder on another machine (\\SERVER1\SHARED for example), the job will run under the Local System security context of \\SERVER2. Eventhough you could be logged into the server doing the AT job as the domain Administrator, the AT job still goes out at Local System.
And since the Local System account for this machine is not in the ACL for the shared folder permissions, the drive mapping will fail. The security on the shared folder does not know who \\SERVER2\Local System is!
So, one way to get around this is to specify in your BAT file drive mapping the user account to use when you do the drive map.
You can specify the /U:user_account switch in the Net Use line to specify an account with network permissions.
So, to map to our shared folder under the Domain Administrator account (let's call the domain DOMAINX for this example) do this:

NET USE i: \\SERVER1\SHARED /U:DOMAINX\ADMINISTRATOR adminpassword

Now yes, the password for the account you are gonna use will have to be in the BAT file as plain text. This is a security concern, so don't give the BAT file to anyone.

hope this helps.

by paulagarron

I had the net use like you wrote me, but it doesn't work, I think may be the nt user who execute processes internally, doesn't have specified permissions, but who can I fix that problem.

by frobo

Hi,

Ms recomends always to start the Scheduler Service with an User Account instead of the local System account. The reason is the Problem youv'e got now. Go to Services and put an User or Admin Account instead of local System account.

regards

Frobo

by wayne r.

Answer 3 sounds about right.

To change the user account for Scheduler go into services from the control panel, select the SCHEDULE service (or Task Scheduler), click on STARTUP. In the LOG ON AS window, select your domain administrator account and input the password.

Once you have done this you will need to stop and restart the service.

Good luck.

by frobo

First create an User Account, and give him the rights you need. Then go to Config, Services and select the Scheduler service. Stop the Service and press the Account button, now type your account and the Password then restart the Service.

regards Frobo

by frobo

I mean the Startup Button, their you will find the Account and Password field.

This discussion is closed to new replies.