Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Start/stop win32 services with CGI - is Perl a good choice?

by maa (Pilgrim)
on Jan 09, 2004 at 08:47 UTC ( [id://320046]=note: print w/replies, xml ) Need Help??


in reply to Start/stop win32 services with CGI - is Perl a good choice?

Hi,

Win32::Service has already been suggested but you need to remember one thing... you're going to have to authenticate the user with the O/S to control the services.

That's easy if you're doing this on an intranet (enable NTLM on the virtual folder)then just go for it... if they have sufficient rights it'll work. It's a lot more complicated if you don't have NTLM or you're talking about doing it over an internet connection...

If you can be more specific (intranet/www, proposed authentication method etc) you might get some even better pointers.

HTH - Mark

Replies are listed 'Best First'.
Re: Re: Start/stop win32 services with CGI - is Perl a good choice?
by inman (Curate) on Jan 09, 2004 at 09:15 UTC
    Assuming that you are using IIS as the web server - maa has pointed out one of the ways to make sure that you are using the correct user account to stop and restart services (an action that requires user permissions). The other ways include:

    1. Enabling basic authentication and setting the domain that IIS checks against to be the local machine. Login as a user with the correct permissions to run your CGI script.
    2. Change the user account that IIS uses for anonymous access to one with appropriate access.

    Neither method is particularly desirable. The first method passes unecrypted user credentials over the network and the second method requires no Windows NT credentials to be passed.

    The second method is however a useful technique if the CGI script is participating in another logon scheme such as a cookie based system or if it is protected by a secure single signon system.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://320046]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (None)
    As of 2024-04-25 04:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found