NetGetAnyDCName() - get PDC of a foreign WinNT-domain

Tim Golden tim.golden at viacom-outdoor.co.uk
Fri Jan 30 09:27:47 EST 2004


>-----Original Message-----
>From: usenet at mail-2-me.com [mailto:usenet at mail-2-me.com]
>Sent: 30 January 2004 12:45
>To: python-list at python.org
>Subject: Re: NetGetAnyDCName() - get PDC of a foreign WinNT-domain
>
>
>Tim Golden <tim.golden at viacom-outdoor.co.uk> wrote in message 
>news:<mailman.844.1075198899.12720.python-list at python.org>...
>> [... snip my suggestion of pdc = win32net.NetGetAnyDCName (None,
>> "name_of_other_domain") ...]
>> 
>> >From: usenet at mail-2-me.com [mailto:usenet at mail-2-me.com]
>> >
>> >Thanks for your help, but that does not work. I get an error message
>> >which sais it can't reach the domain.
>> >But I'm sure did not make an syntax-error, because if I enter my own
>> >domain it works.
>> >
>> >Any other idea?
>> >
>> >Dirk
>> >
>> >
>> 
>> To ask the obvious question: do you definitely have all
>> the necessary security / connectivity in place to reach
>> the domain controller on that domain?
>
>
>I can reach the other domains and I have all rights. That's no 
>the problem.
>
>Dirk

Could you dump a cut-and-paste of the interpreter, so
we can see what's happening? This is what I get, altho'
as I say, I don't have another domain. Is yours the same?

<dump>

ActivePython 2.2.3 Build 227 (ActiveState Corp.) based on
Python 2.2.3 (#42, Nov 13 2003, 09:57:55) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32net
>>> win32net.NetGetAnyDCName ()
u'\\\\VOBDC1'
>>> win32net.NetGetAnyDCName (None, "VOUK")
u'\\\\VOBDC1'
>>> win32net.NetGetAnyDCName (None, "non-existent")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
pywintypes.error: (1355, 'NetGetAnyDCName', 'The specified domain either
does not exist or could not be contacted.')
>>>

</dump>

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________




More information about the Python-list mailing list