NT info

Mark Hammond MarkH at ActiveState.com
Thu Aug 23 07:54:15 EDT 2001


Kim C Tran wrote:
> Hi all,
> 
> Is there a function that I can display a list of users in server and 
> when they last log on ??
> API function may be ??

The win32net module (found in ActivePython, or win32all for the 
reference distribution) will give you what you need.

Page 294 of "Python Programming on Win32" demonstrates that:

win32net.NetUserEnum("\\\\server_name", 2, 
win32netcon.FILTER_NORMAL_ACCOUNT, 0)

Will return the info you need.

Mark.




More information about the Python-list mailing list