[python-win32] Where are the Lsa* functions?
Jeffrey C. Ollie
jeff@ollie.clive.ia.us
Wed, 13 Jun 2001 08:15:45 -0500
I'm just getting started doing some win32 programming with the win32
extensions from ActivePython 2.1 build 210. I've never done any win32
programming before but I've been able to figure things out from MSDN
and the sample win32 code included with ActivePython.
The task that I'm faced with now is to:
1. Copy a set of files from a network drive to the local workstation drive.
2. Create a local user account on a Windows NT 4.0 workstation.
3. Add the SeLogonServiceRight to the local user account.
4. Install three services, one of which logs on as the aforementioned account.
5. Be able to undo the previous steps.
I've been able to accomplish everything that I need so far except to
be able to add the SeLogonServiceRight to the local user account.
>From digging through MSDN, it appears that I need the LsaOpenPolicy,
LsaAddAccountRights, and LsaRemoveAccountRights functions. These
functions do not appear to be defined in the win32 extensions (I've
even grepped through the source code).
I've been able to work around the lack of the Lsa* functions by
running an external command-line program that I downloaded off the net
(see <http://www.franzo.co.nz/hansson/grant.htm>). It'd be much
cleaner though if I could add the rights without calling an external
program. Is there any chance that the Lsa* functions will get added
to the win32 extensions in the near future? I don't have access to a
win32 compiler - I'd consider attempting to add the Lsa* functions
myself if I did.
Jeff