Q:Need assistance figuring out AD structure and query for name * newbie

  • Thread starter Thread starter Dave Rupp
  • Start date Start date
D

Dave Rupp

I inherited an AD system and don't really know anything about AD. I'd
like to build an asp web page to query for users and return some info.
I've found script on MS.COM, but can't figure out the query string to
get started. Any kind souls out there? Best I can figure is my AD
structure looks like this:
ourdomain.com
- UMTH Users
- Dallas
- CRC
- then the "real" users name

Help!?

TIA,
Dave...
 
Dave,

Please do not misunderstand this, but if you do not know anything about
Active Directory how did you inherit an AD environment? Is it possibly due
to the fact that the Systems Administrator left the company unexpectedly and
you are the only one who has any idea about computers?

Anyway, what exactly are you trying to get? What do you mean by 'query for
users and get some information'? Are you trying to find out what user
account objects there are and some of the attributes? If that is the case
then you could take a look at ldifde or csvde.

If you want to see the computer account objects then you could - in addition
to ldifde - take a look at oldcmp from Joe's web site at
http://www.joeware.net and go to the free WIN32 C++ based tools. I like the
dhtml report.

About how many user account objects are there? and computer account
objects?

There are naturally a thousand questions but let's start with these.....

HTH,

Cary
 
Cary,
You guessed it from the inheritance standpoint. We're just a small
shop, for now. ;-)

Based on my "AD structure" I previously post I'd like to make this MS
sample script work:

Dim objDSE, strDefaultDN, strDN, objContainer, objChild

Set objDSE = GetObject("LDAP://www.ourdomain.com/RootDSE")
strDefaultDN = "CN=UMTH Users," & objDSE.Get("defaultNamingContext")

strDN = InputBox("Enter the distinguished name of a container" & _
vbCrLf & "(e.g. " & strDefaultDN & ")", , strDefaultDN)

If strDN = "" Then WScript.Quit(1) 'user clicked Cancel

Set objContainer = GetObject("LDAP://" & strDN)

objContainer.Filter = Array("user")
For Each objChild In objContainer
WScript.Echo objChild.Name & vbTab & objChild.Description
Next

But since I don't understand AD's "structure" I can't figure out the
strDefaultDN string. In a nutshell, I'd like to build an asp page
where people can enter a user's name and I'll return, from AD, their
name as it shows up in AD, Office, Description, Phone, e-mail. Just
the basic stuff I can see in the Admin AD tool.

TIA,
Dave...
 
Back
Top