Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to Display all User Class Objects in AD!!

Status
Not open for further replies.

chriscak

Technical User
Apr 19, 2005
3
0
0
NL
I am a newbie at Vbscript and LDAP
I have the following piece of code literally from the books:
-----------
<%
Dim RootDSE
Dim UserContainer
Dim User
Dim RelativePathFromDomainToUserContainer

RelativePathFromDomainToUserContainer = "OU=Helpdesk,OU=Beheerders,OU=CAK-USERS,"

Set RootDSE = GetObject("LDAP://RootDSE")
Set UserContainer = GetObject("LDAP://" & RelativePathFromDomainToUserContainer & RootDSE.Get("DefaultNamingContext"))
UserContainer.Filter = Array("User")

For Each User in Usercontainer
Response.Write User.AdsPath & "<BR>"
Next
%>
-----------

It is supposed to give me all the User Class Objects in that container. Unfortunately all i get is:

-----------
error '80005000'
/adsibook2.asp, line 19
-----------

Does this sound familiar to anyone or can anyone see what i am doing wrong, if so please help me out. I've been struggling with this for quite some time now, but i can't seem to get it to work by myself :-(
 
Zcolton,

Thanx for replying. I tried some of the scripts in that thread and did get security errors like [Provider error '80004005' Unspecified error] and [Provider error '80040e09'Permission denied.]
They bomb on [Set rs = Com.Execute]
Well, i'll just to look for the security problem now. Thanx for putting me in the right direction.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top