Executing Commands From Windows Service
T
misceverything at gmail.com
Sat Feb 13 01:36:44 EST 2010
On Feb 11, 8:21 am, "Martin P. Hellwig" <martin.hell... at dcuktec.org>
wrote:
> On 02/07/10 19:02, T wrote:
>
> > I have a script, which runs as a Windows service under the LocalSystem
> > account, that I wish to have execute some commands. Specifically, the
> > program will call plink.exe to create a reverse SSH tunnel. Right now
> > I'm using subprocess.Popen to do so. When I run it interactively via
> > an admin account, all is well. However, when I'm running it via
> > service, no luck. I'm assuming this is to do with the fact that it's
> > trying to run under the LocalSystem account, which is failing. What
> > would be the best way around this? Thanks!
>
> All being said about LS account not having the appropriate rights to
> access the necessary devices/files.
>
> Could it be so simple that the network is plain simply not available at
> all? For wireless connections I believe the connection/authentication by
> default is made in user space. I would save the output of an ipconfig
> run as the LS account to a file and see what is happening.
> Perhaps followed by a ping.
>
> --
> mph
Martin - another part of the program sends an email back to a
specified user, and that works, so LocalSystem must at least have some
network access. From the testing I've done so far, seems like there's
just some grey area (which I haven't completely figured out yet) of
network-related tasks that LS just can't do. I'd love to know what
this is, but so far the solution I have is just to create another user
and have the service use that..
More information about the Python-list
mailing list