Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Access network resources from CGI script on NT web server

( #57432=categorized question: print w/ replies, xml ) Need Help??
Contributed by Anonymous Monk on Feb 09, 2001 at 22:17 UTC
Q&A  > CGI programming


Description:

Is it possible to access a NT network share from a CGI script running on an NT web server? So far I have only been able to access the local file system of the web server.

Answer: Access network resources from CGI script on NT web server
contributed by tye

The default WinNT CGI security environment has no access to network resources at all.

Even if you change your CGI environment to run as a specific user, the CGI scripts will be run as that user except with no access to network resources.

I think you can get past this by using LoginAsUser() and RunProcessAsUser() (probably from Win32::AdminMisc from http://www.roth.net/) but that involves storing the password "in the clear" somewhere where the CGI script can get at it and I consider that just one small step from publishing the password on the internet (ie., a security risk).

Answer: Access network resources from CGI script on NT web server
contributed by Mitch

This can be accomplished by going into IIS and select the directory/program being executed. In Properties select "Directory Security", then click the "edit" button for Authentication control. Under "Allow Anynmous Access" click "Edit" and then de-select the default account and add an account that has full permissions to the network devices you want to hit. Ex: Enter a domain admin account.

Answer: Access network resources from CGI script on NT web server
contributed by Anonymous Monk

If Anonymous Authentication in use then disable "Automatic Password Synchronization" if IIS is running on Domain Controller. Miroslav

Please (register and) log in if you wish to add an answer



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (6)
    As of 2014-09-23 03:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (210 votes), past polls