Running DOS Commands with Unix UNC Paths within ASP

A

Anonymous

I just posted this in microsoft.public.inetserver.iis but thought this might
be a better place for it.
I have the following ASP page that simply executes a DIR command on a UNC
path and displays the results. When the UNC path is a Windows machine the
output is as expected however when the UNC path is a Unix machine running
Samba, nothing is returned. I've configured the Authentication Method for the
IIS web site to use an account that has permissions to both the Windows and
Unix shares and confirmed this is the case by logging into the IIS server via
RDP as this account and running the command from a DOS window, which works
fine for both the Windows and Unix shares. The Samba server is configured to
authenticate against the same domain as the IIS and File share servers.

I don't believe there is a permissions problem and instead there is some
wierd interaction between the CMD.EXE instance created by the ASP page and
Unix server running Samba.

<%
Set objShell = CreateObject("WScript.Shell")
Set objExec = objShell.Exec("cmd /c dir \\server\share")
Set objStdOut = objExec.StdOut
strOutput = objStdOut.ReadAll
Response.Write strOutput
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top