1984
(Starting to like KiXtart)
2004-02-05 02:02 PM
How to use kix to call LDAP and collect info

Hey,

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

Thanx

/C


Sealeopard
(KiX Master)
2004-02-05 02:03 PM
Re: How to use kix to call LDAP and collect info

Via the ADSI COM interface. See the COM and UDF Forum for ADSI scripts and UDFs.

1984
(Starting to like KiXtart)
2004-02-05 03:33 PM
Re: How to use kix to call LDAP and collect info

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


LonkeroAdministrator
(KiX Master Guru)
2004-02-05 03:35 PM
Re: How to use kix to call LDAP and collect info

afaik adsi is part of all AD-aware systems.

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


Sealeopard
(KiX Master)
2004-02-05 04:46 PM
Re: How to use kix to call LDAP and collect info

See out fine FAQ Forum under ADSI/WMI/COM Info and links

1984
(Starting to like KiXtart)
2004-02-05 04:48 PM
Re: How to use kix to call LDAP and collect info

Where do i get ADSI for win 2000 client ???



Sealeopard
(KiX Master)
2004-02-05 04:50 PM
Re: How to use kix to call LDAP and collect info



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?


1984
(Starting to like KiXtart)
2004-02-05 05:30 PM
Re: How to use kix to call LDAP and collect info

Didnt see your post. Was busy with searching for LDAP info on web. I will check the links.

Thnx a lot sealeopard


1984
(Starting to like KiXtart)
2004-02-05 05:59 PM
Re: How to use kix to call LDAP and collect info

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?


1984
(Starting to like KiXtart)
2004-02-05 06:03 PM
Re: How to use kix to call LDAP and collect info

Error creating user object: -2147016646 The server is not operational.

hummmm