Board index » Visual Studio » Access LDAP across domain.
|
An0nYm0u$
|
Access LDAP across domain.
Visual Studio275
I am trying to access ldap server across domain to query and then hopefully configure a computer security context. i.e. - the script is run from ComputerA (domain - domainXX) - and query ComputerB (domain - mydomain) for an security context. When I run the following script, I get 'A referral was returned from the server' But, if I run it from a machine from mydomain.lh.int, it works fine. --- strRemoteMachine = ComputerB const ADS_SECURE_AUTHENTICATION = 1 strUserName = "myuser" strPassword = "mypasswd" buildStr = "LDAP://cn=" & strRemoteMachine& ",cn=Computers,dc=mydomain,dc=lh,dc=int" Set dso = GetObject("LDAP:") Set obj1 = dso.OpenDSObject( buildStr, strUserName, strPassword, ADS_SECURE_AUTHENTICATION) obj1.GetInfo intUAC = obj1.Get("userAccountControl") Wscript.Echo "User Account Control - Before: " & intUAC --- Any help is appreciated. Thanks, Sandiyan. - |
