Problem Using win32security
John Abel
johnfabel at btinternet.com
Mon Mar 17 15:29:48 EST 2003
Just to add to this. I have searched the archives, and have added the
AdjustPrivilege code by Mark Hammond, and it still isn't working. I've
added :
AdjustPrivilege(SE_TCB_NAME)
AdjustPrivilege(SE_CHANGE_NOTIFY_NAME)
AdjustPrivilege(SE_ASSIGNPRIMARYTOKEN_NAME)
before the LogonUser call, without success. After reading another post,
I've also added Administrators to "act as part of the os". I presume I
need to reboot after this? Has anyone got this working?
Thanks
John
John Abel wrote:
> Hi,
>
> I am trying to use win32security.LogonUser(). However, I always get
> this:
>
> api_error: (1314, 'LogonUser', 'A required privilege is not held by
> the client.')
>
> The code isn't spectaculer:
>
> import win32security, win32con
>
> logonHandle = win32security.LogonUser( 'johnab',
> None,
> 'test',
>
> win32con.LOGON32_LOGON_INTERACTIVE,
>
> win32con.LOGON32_PROVIDER_DEFAULT )
>
> I'm running the code, whilst logged on as Administrator. Has anyone
> any pointers?
>
> Thanks
>
> John
>
>
More information about the Python-list
mailing list