join a samba domain
Tim Golden
mail at timgolden.me.uk
Tue Dec 23 04:59:07 EST 2008
Toff wrote:
> On 22 déc, 19:37, Toff <christophed... at gmail.com> wrote:
>> On 22 déc, 18:59, Jens Henrik Leonhard Jensen
>>
>> <j... at statsbiblioteket.dk> wrote:
>>> Toff wrote:
>>>> d = c.Win32_ComputerSystem
>>>> d.JoinDomainOrWorkGroup(None, 3, "mydom", "mydompw", r"admin\\mydom")
>>> Shouldn't r"admin\\mydom" be "admin\\mydom" or r"admin\mydom".
>>> Or maybe just "admin"
>>> /Jens Henrik
>> you are right but i've got the same error.
>
> the more i look at my script the more i think it s a BUG.
>
> #ALL works great
> import wmi
> c = wmi.WMI()
> for computer in c.Win32_ComputerSystem():
> if computer.PartOfDomain:
> print computer.Domain #DOMCD
> print computer.SystemStartupOptions # (u'"Microsoft Windows XP
> Professionnel" /noexecute=optin /fastdetect',)
>
> #error message
> computer.JoinDomainOrWorkGroup('DOMCD', 'adminLocal', 'admin\
> \DOMCD',None,3 )
Try: computer.JoinDomainOrWorkgroup (...)
note the lowercase "group"
TJG
More information about the Python-list
mailing list