enumerate an OU with asp using adsi need help

S

ssghill

Okay all i'm new to the asp portion but fairly good with vbscript. My
problem is that I am trying to us an asp page to enumerate an ou. The
problem is when I us localhoston the intranet web server it works, but
when I try to use the unc path it does not. Now I know it has
something to do with permissions. Did a little research and found out
that I have to delegate through IIS. So i setup "integrated windows
authentication" and still no progress. This is what my scripts look
like.

The first one asks for the ou that you want to enumerate.

<html>
<body>

<form method="POST" action="enum.asp" ID="Form1">
<p>Distinguished name of container:<input type="text"
name="inpContainer" size="100" ID="Text2"></p>
<p><input type="SUBMIT" value="GO" ID="Submit1" NAME="Submit1"></p>
</form>

</body>
</html>

the enum.asp page is called from this page and this is what it looks
like:

<%@ Language=VBScript %>
<%
' Get the inputs.
containerName = Request.Form("inpContainer")
' Validate compName before using.

If Not ("" = containerName) Then
' Bind to the object.
adsPath = "LDAP://ou=" &
containerName&",dc=servername,dc=servername,dc=com"
Set comp = GetObject(adsPath)

' Write the ADsPath of each of the child objects.
Response.Write("<p>Enumeration:</p>")
For Each obj in comp
Response.Write(obj.samaccountname + "<BR>")
Next
End If
%>

Am i missing some other sort of authentication? Any help would be
greatly appreciated.

J
 
S

ssghill

Okay all i'm new to the asp portion but fairly good with vbscript. My
problem is that I am trying to us an asp page to enumerate an ou. The
problem is when I us localhoston the intranet web server it works, but
when I try to use the unc path it does not. Now I know it has
something to do with permissions. Did a little research and found out
that I have to delegate through IIS. So i setup "integrated windows
authentication" and still no progress. This is what my scripts look
like.

The first one asks for the ou that you want to enumerate.

<html>
<body>

<form method="POST" action="enum.asp" ID="Form1">
<p>Distinguished name of container:<input type="text"
name="inpContainer" size="100" ID="Text2"></p>
<p><input type="SUBMIT" value="GO" ID="Submit1" NAME="Submit1"></p>
</form>

</body>
</html>

the enum.asp page is called from this page and this is what it looks
like:

<%@ Language=VBScript %>
<%
' Get the inputs.
containerName = Request.Form("inpContainer")
' Validate compName before using.

If Not ("" = containerName) Then
' Bind to the object.
adsPath = "LDAP://ou=" &
containerName&",dc=servername,dc=servername,dc=com"
Set comp = GetObject(adsPath)

' Write the ADsPath of each of the child objects.
Response.Write("<p>Enumeration:</p>")
For Each obj in comp
Response.Write(obj.samaccountname + "<BR>")
Next
End If
%>

Am i missing some other sort of authentication? Any help would be
greatly appreciated.

J


bump
 
S

shashank kadge

The context user under whose credential this asp page is running, is
that user account previliged to access the OU?

-
shashank kadge
 
S

ssghill

The context user under whose credential this asp page is running, is
that user account previliged to access the OU?

-
shashank kadge

Yes the user is a domain admin.
 

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

Top