[python-win32] win32net

Teodor Ivanov theodorei at yahoo.com
Tue May 29 15:41:48 CEST 2007


Tim Roberts <timr <at> probo.com> writes:

> 
> Wolf, Matthias ALRT/ELD wrote:
> 
> >Thanks for your answer!
> >
> >You are right, but in the group 'GROUP' are users and groups and I want to
receive both. Probably I need
> something like "win32net.NetGroupGetGroups" instead of
"win32net.NetGroupGetUsers". Is there any
> possible way to realise this?
> >  
> >
> 
> According to the MSDN documentation, NetGroupGetUsers is used to list
> the members of a "global group", and a "global group" can only contain
> domain users.  It cannot contain other groups.
> 
> Local groups can contain other groups, but you use
> NetLocalGroupGetMembers to examine those.
> 
The statement '"global group" can only contain domain users' is true only for 
MS domains running in mixed mode ( I mean the OS of primary domain controller is
Windows 2000 or 2003 ), but if it is in native 2000 or native 2003 mode, then
the global security groups can contain other security groups:
http://technet2.microsoft.com/windowsserver/en/library/95107162-47eb-4891-832f-0c0b15b7c8581033.mspx?mfr=true
and independant from NetGroupGetUsers documentation:
http://msdn2.microsoft.com/en-us/library/aa370430.aspx
it returns just the 'user members', but not the 'group members'. 
Does anybody have an ideia how to get the 'group members' of a group from domain
running in native mode, as well?

Thank you!

Teodor






More information about the Python-win32 mailing list