Server permission problems and SchAgent

From: tlviewer (tlviewerSHRUB_at_yahoo.CHENEY.com)
Date: 08/14/04


Date: Sat, 14 Aug 2004 02:57:45 -0700

Hi All,

Using Win2k sp3
Perl 5.8.1
Apache2

I was using a CGI script in an Apache2/Win2k
network to browse files and filetime info
on the server and across the network. Using
the default account for Apache2, I succeeded
on the web server, but got bad file descriptors
when going across LAN. It was the usual permission
trouble.

Since I was using Perl CGI I ran over to CPAN
and looked for a module to do a CreateProcessWithLogon
or some such beast.

I couldn't get any of several modules to work.
Then I realized that the trusty Scheduler.SchAgent
might be the trick.

I ended up using a named pipe. The CGI script
fires a Pipe client (setup as a Scheduled Task) to read
 the x-lan file, and write to the named pipe.
The info was read back from inside the CGI script
running a Pipe server.

The CGI script used the SchAgent object to Activate
the desired Scheduled Task, give it the right command
line, then "Run" it.

It works because the web server is running in the
SYSTEM account, and the fired Scheduled Task is running
as the Administrator. I setup the task before hand with
username and password I need, but when I "Run" from CGI
its not necessary to supply the credentials again :)

Here's a simple Perl demo
http://4.11.211.97/PLPipe.zip

regards,
tlviewer



Relevant Pages

  • Re: How to embed javascript functionality into a Perl CGI script?
    ... Does it mean we can't do dynamic magic in CGI Perl? ... JSP executes on server side and Javascript on the client. ... >> HTML content using Perl CGI script. ...
    (comp.lang.perl.misc)
  • Server permission problems and SchAgent
    ... I was using a CGI script in an Apache2/Win2k ... on the server and across the network. ... Since I was using Perl CGI I ran over to CPAN ... fires a Pipe client (setup as a Scheduled Task) to read ...
    (microsoft.public.scripting.wsh)
  • Re: IIS Config Help - This is a hard one - Migration from Linux to Win2K
    ... Migrate Apache Settings and Configure IIS in a UNIX-to-Windows ... > I am migrating a website from a Linux server to a Win2k server. ... > to a CGI script. ... > pop-up the binary data in a new browser page. ...
    (microsoft.public.inetserver.iis.security)
  • CGI error (need help)
    ... I have a problem with a CGI script (Perl) on a Win2000 server. ... Each mail generates a new .dat file. ...
    (comp.lang.perl)
  • about CGI
    ... I don't know Perl to build a CGI script but I know C++. ... The html page inside the server how is stored? ...
    (comp.lang.perl.misc)