Page 1 of 1 1
Topic Options
#113414 - 2004-02-05 02:02 PM How to use kix to call LDAP and collect info
1984 Offline
Starting to like KiXtart

Registered: 2003-08-14
Posts: 150
Hey,

Anybody know how to do ladpsearch from windows environment?
Using kix to call a ldap server and collect info...

Thanx

/C
_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"

Top
#113415 - 2004-02-05 02:03 PM Re: How to use kix to call LDAP and collect info
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Via the ADSI COM interface. See the COM and UDF Forum for ADSI scripts and UDFs.
_________________________
There are two types of vessels, submarines and targets.

Top
#113416 - 2004-02-05 03:33 PM Re: How to use kix to call LDAP and collect info
1984 Offline
Starting to like KiXtart

Registered: 2003-08-14
Posts: 150
Hummm, getting confused ...

Do i need to install ADSI to be able to do a ldapsearch.

In UNIX its just put something like:
ldapsearch -h ldap.company.com -p 389 -b o=comany userid=cyrus

Could u please provide a starter as i am a kick forward ?

BR
/C
_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"

Top
#113417 - 2004-02-05 03:35 PM Re: How to use kix to call LDAP and collect info
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
afaik adsi is part of all AD-aware systems.

eh, what the... try it out and you shall see.


Edited by Lonkero (2004-02-05 03:36 PM)
_________________________
!

download KiXnet

Top
#113418 - 2004-02-05 04:46 PM Re: How to use kix to call LDAP and collect info
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
See out fine FAQ Forum under ADSI/WMI/COM Info and links
_________________________
There are two types of vessels, submarines and targets.

Top
#113419 - 2004-02-05 04:48 PM Re: How to use kix to call LDAP and collect info
1984 Offline
Starting to like KiXtart

Registered: 2003-08-14
Posts: 150
Where do i get ADSI for win 2000 client ???

_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"

Top
#113420 - 2004-02-05 04:50 PM Re: How to use kix to call LDAP and collect info
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA


It's already there! How else could it natively interact with an Active directory domain? Did you not read the link I've posted earlier?
_________________________
There are two types of vessels, submarines and targets.

Top
#113421 - 2004-02-05 05:30 PM Re: How to use kix to call LDAP and collect info
1984 Offline
Starting to like KiXtart

Registered: 2003-08-14
Posts: 150
Didnt see your post. Was busy with searching for LDAP info on web. I will check the links.

Thnx a lot sealeopard
_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"

Top
#113422 - 2004-02-05 05:59 PM Re: How to use kix to call LDAP and collect info
1984 Offline
Starting to like KiXtart

Registered: 2003-08-14
Posts: 150
Gettings error:

Error creating user object: -2147221020 Invalid syntax

$sysinfo = CreateObject("adsysteminfo")
If VarTypeName($sysinfo)='object'

; Get user's distinguished name (DN) ...
$username = $sysinfo.username

?"ADsPath = $username"

; Bind directly to user's active directory object ...
$user = GetObject("LDAP://" + $username)

If VarTypeName($user)='object'

; Get the path of the parent container ...
$parentpath = $user.parent

; Get the parent ...
$parent = GetObject($parentpath)

If VarTypeName($parent)='object'
$ou = $parent.name

?"OrganizationalUnit = $ou"
Else
? "Error creating parent object: @error @serror"
EndIf
Else
? "Error creating user object: @error @serror"
EndIf
Else
? "Error creating adsysteminfo object: @error @serror"
EndIf
Exit

Any ideas?
_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"

Top
#113423 - 2004-02-05 06:03 PM Re: How to use kix to call LDAP and collect info
1984 Offline
Starting to like KiXtart

Registered: 2003-08-14
Posts: 150
Error creating user object: -2147016646 The server is not operational.

hummmm
_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.059 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org