Hi,
i've written a very simple script to determine whether a specific Server is responding to LDAP requests.
I'm querying two Domain Controllers running Windows 2003 SP2.
The script works as long as I'm executing it on one of the two Domain Controllers itself.
As soon as I'm executing it from another machine (Windows 7), no matter if it's a Domain member or not, I'm getting "1074 Local error occured" at the DsIsContainer line.
AddExtender("wwads44i.dll")
LDAP_Server1="DC1-ELS1.els1.els-m68.net"
LDAP_Server2="DC2-ELS1.els1.els-m68.net"
#DefineSubroutine SetLDAPCredentials()
slc_User="CN=xxxxxx,OU=Dienste,OU=LAN Benutzer,OU=People,DC=els1,DC=els-m68,DC=net"
slc_Password="*********"
dsSetCredent(slc_User,slc_Password)
;dsSetCredentX(slc_User,slc_Password,1 | 2)
DropWild("slc_*")
Return
#EndSubroutine
#DefineSubroutine SelectLDAPServer()
sls_Counter=1
While IsDefined(LDAP_Server%sls_Counter%)
sls_ADSIpath=StrCat("LDAP://",LDAP_Server%sls_Counter%,"/CN=ELS-1 Netzwerk,OU=FW Devices,OU=People,DC=els1,DC=els-m68,DC=net")
sls_Result=DsIsContainer(sls_ADSIpath)
If sls_Result Then Message("sls_Result",StrCat("LDAP is OK on Server ",LDAP_Server%sls_Counter%))
sls_Counter=sls_Counter+1
EndWhile
DropWild("sls_*")
Return
#EndSubroutine
SetLDAPCredentials()
SelectLDAPServer()
So everything is explicitly defined. Any idea why this wouldn't work on other machines than the DCs ??
And what does "local error" mean?
Regards
Peter