Hi all
I have a problem. I am developing a service which need to run as Local
System Account, and which need to access a directory on a remote computer, in
order to both read and write files. Both computers are running Windows 2000
and are in the same domain.
As Local System Account do not have any network permissions as such, I have
tried some alternative approaches but none seem to work.
1). I have tried to share the directory on the remote machine as a so called
null session share
(http://support.microsoft.com/default.aspx?scid=kb;en-us;289655), as that in
theory should allow access to everyone and everything. But when I tried to
write a file I got the "System error 5 has occurred.Access is denied." error.
2) Next I have tried to grant the computer account on which the service is
running full access to the share as this article describes
(http://forumz.tomshardware.com/software/Folder-Sharing-Computer-Accounts-ftopict225518.html). With the same result.
The way I tested both approaches this:
In both methods I use UNC format and IP numbers to address the remote share,
like this: \\192.168.106.12\share\
1) Run some code in my service using the function
OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer, ulFlags, file_name,
szFilePrefix, out_stream) function, and also fopen(
"\\192.168.106.12\\share\\data.dat", "w+" ). Both methods fail though.
2) started a CMD prompt with Local Systems Account credentials (using the
method described here:
http://www.windowsitpro.com/Article/ArticleID/47673/47673.html and the
psexc.exe tool from sysinternals - running psexec.exe -s cmd.exe). Then tried
to both copy a file manually using the copy command and to map a drive letter
using "net use". But all I got was a "System error 5 has occurred.Access is
denied."
I would appreciate any help I can get. Small things to try or even whole new
approaches, as I am really running out of ideas here. Also if you need
further information regarding my setup, please let me know.
Thanks, and a merry Christmas to all
Kind regards/ Venlig hilsen
Peter Langhoff Feddersen
System Engineer, MCSD
Systematic Software Engineering A/S
Web: www.systematic.dk