How do I request user right: SeShutdownPrivilege



Windows 2003 server SP2 enterprise,
IIS, ASP enabled, execute mode: script and executables.

How do I request this user right:
SeShutdownPrivilege
I do not seem to have it, when I run an ASP script on the server
as Asministrator. I want to restart the server from ASP.

Please give me either ASP or C++ implementation how to request
this user right... And thank You for any good web link too!



// details:
// login as administrator to local web site and GET:
// http://localhost/restart_test.exe
// Shutdown in progress dialog box is displayed on server's console.
// this is the desired behaviour, but I want to do it from ASP.


// login as administrator to local web site and GET:
// http://localhost/test.asp

// in the ASP I execute this server side script:
var WshShell=Server.CreateObject("WScript.Shell");

WshShell.Exec("C:\\Inetpub\\restart_test.exe");

var stdOutText=objCmd2.StdOut.Readall();
response.write(stdOutText);


// source code for restart_test.cpp
InitiateSystemShutdown(NULL, NULL, 300, false, true);
printf("[errorCode=%d]", GetLastError());

// The web page returns:
// [errorCode=5] // 5 = Access Denied

// this means that I am missing this right:
// SeShutdownPrivilege



.



Relevant Pages

  • Re: IP addresses and JS.
    ... >>A computer language is just that, ... Javascript is just a programming language, and may be used to script all ... The interaction between a web browser and a server is through HTTP. ... execute scripts and/or programs, ...
    (comp.lang.javascript)
  • IIS 6 shell
    ... The server is Running Windows Server 2003 and IIS 6 fully patched, ... in the application we have an upload form to upload pictures to the ... javascript support is also poor and the script did not run properly ... (except asp!) ...
    (Pen-Test)
  • How execute DTS from a ASP
    ... I have found the script that allow to execute the DTS from asp but I have a ... Dim oPkg, oStep, sErr, bSuccess ...
    (microsoft.public.sqlserver.dts)
  • RE: executing scripts within a web browser control under the syste
    ... server hosting the ASP pages as a trusted site for all users on the machine ... There are no ActiveX controls on the ASP page ... Write a test.js script file in local driver D:\. ... launches a console process under System Account. ...
    (microsoft.public.dotnet.general)
  • RE: ASP Pages
    ... There is another way to encode your ASP scripts.. ... Microsoft Gives a Script Encoder: ... Then register the dll into your server registry. ... >> The Gartner Group just put Neoteris in the top of its Magic Quadrant, ...
    (Security-Basics)