1026 error - the specified domain either does not exist or could not be contacted
Keywords: 1026 error - the specified domain either does not exist or could not be contacted
Question:
I have a Winbatch script using ADSI extender which fails only when running on a workstation logged in with
local admin account. If I logon with domain account it works great, but I need it to run logged in as local
admin.
following is excerpt from script
sAdsiPath = "LDAP://CN=Computers,DC=xxx,DC=yyy,"
DsSetCredent("user@UPN","pwd")
sContainer = dsGetChildPath(sAdsiPath,"")
I get "1026 error - the specified domain either does not exist or could not be contacted"
I have verified the account used with DsSetCredent is valid and has access to AD. As I said this errors if I
use local admin account.
Thanks in advance for any help !!
Answer:
I am not to sure about this one. I tried creating an ADSI user on our domain with my work station's local
admin. account and it worked just fine (credentials were set to a privileged domain user). I am using WinXp
Pro but I think it should work with Win2k Pro, as well.
The only thing that comes to mind is that the Windows network will not let you connect to a server with two
different sets of credentials at the same time. For example, if you have a share open on the server as one
user and run a script as another user, the script will fail.
If you find a solution let us know. I am sure you are not the first person to encounter this problem.
Resolution:
Found it. Actually the Winbatch article on ADSI Paths gave me a clue. It states "ADSI extender processes
your serverless path calls by finding the domain associated with current security context". Of course running
with local admin, It would not be able to find a domain and hence the 1026. So the answer is cannot use
serverless adsi path. Modified code to set server in ADSIPATH
sAdsiPath = "LDAP://dcname/Dc=xxx,Dc=yyy"
and it worked like a champ !!
Article ID: W15036
File Created: 2002:09:05:13:49:16
Last Updated: 2002:09:05:13:49:16