How to enum all the users from a windows domain via python win32net module?

vimuser zhangyunfan2 at gmail.com
Mon Feb 16 04:39:01 EST 2009


I tried the command "net user /DOMAIN" in windows console(cmd.exe),
and it showed me all the usernames in my domain without any problems.
But when I tried it in python with these commands :
info=win32net.NetUserEnum("DOMAIN_NAME",1),
info=win32net.NetUserEnum(r"\\DOMAIN_NAME",1),and
info=win32net.NetUserEnum("\\\\DOMAIN_NAME",1), I all got the System
Error 53 (The network path was not found) .

What should I do, if I intend to enum all the users from a windows
domain via python win32net module?



More information about the Python-list mailing list