hi monks-

Using perl cgi script from browser, trying to create a OLE object on server returns following error.

User credentials cannot be used for local connections

Win32::OLE(0.1702) error 0x80041064 in METHOD/PROPERTYGET "ConnectServer" at D:/cgi-bin/simkill.pl

below is my sample code :

my $loc = Win32::OLE->new("WbemScripting.SWbemLocator") + or die "err stms here"; my $servCon = $loc->ConnectServer($server, "root/cimv2", $username, $p +assword, "MS_409", "ntlmdomain:".$strDomain);

I checked out that user runs with Iusr_ComputerName privilege using IE on IIS which is only a guest Account. So i am supplying administrator user name and password when creating an OLE object in the code above. same code from command prompt runs well both on local and remote machines but when a cgi script is made it fails to run from the browser. I feel there is some security aspect to it.

I tried hard to find a solution but could not.

Help me wise monks...

regards

amar


In reply to OLE object creation from browser returns error by Amar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.