Map network drive using SYSTEM account?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Whenever my batch files run as a scheduled task on W2K Server using the
'system' account I get the error; "System error 1312 has occurred. A
specified logon session does not exist. It may already have been terminated."
when attempting to map (net use) a drive to a remote machine. It also
generates an Event ID: 3034 in the event log.

I've found alot of 'almost' answers but not THE answer to the question:
Is it possible to map a network drive (net use) while running a batch file
in the system security context and if so, how?

Any help would be appreciated.
 
rgp said:
Whenever my batch files run as a scheduled task on W2K Server using the
'system' account I get the error; "System error 1312 has occurred. A
specified logon session does not exist. It may already have been terminated."
when attempting to map (net use) a drive to a remote machine. It also
generates an Event ID: 3034 in the event log.

I've found alot of 'almost' answers but not THE answer to the question:
Is it possible to map a network drive (net use) while running a batch file
in the system security context and if so, how?

Any help would be appreciated.
Hi

Do you map with explicit user account and password like this:

If the computers are members of the same domain:

net use y: \\<server>\<share> <password> /user:<domain\user>


if not:
net use y: \\<server>\<share> <password> /user:<remote computer\user>
 
rgp said:
I've found alot of 'almost' answers but not THE answer to the question:
Is it possible to map a network drive (net use) while running a batch file
in the system security context and if so, how?

If I'm not mistaken the system account doesn't have access to network
resources.
 
I've found alot of 'almost' answers but not THE answer to the question:
If I'm not mistaken the system account doesn't have access to network
resources.

Well, the system account tries to open so called NullSessionShares. MS
blocked most of those accesses with NT 4.0.
If you want to open shares again (and some security risks, too) you have to
run REGEDT32 and add the share name to
HKLM\system\CurrentControlSet\Lanmanserver\Parameters:NullSessionShares
to the servers registry. Restart SERVER service.
For admins with a desperate need for fun and adventure there is an
additional reg entry called RestrictNullSessAccess in the very same place.
Set DWORD to 1.

Ciao, Walter
 
I map to a specific account with user name and password using the IP address
of the target. This works fine when the owner of the job is an
administrator. The servers the batch job will be running on are all
stand-alone workgroup servers, remotely administered thru MS Transaction
Server.
 
I don't think it does either Paul, but it would be useful given the network
minefield I have to work in. I think I've solved the problem though by using
'net user/accounts' and a 'runas' password pipe.
Thanks for the reply.
 
Doesn't providing access to NullSessionShares only work for machine SIDs
registered in the same domain as the sharing server?
 
Back
Top