LogOnUser fails on Win 2k
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I am trying to impersonate a user on Win 2k machines. The LogOnUser() api works perfect on XP, 2k3 but it fails on win 2k machines as it requires SE_TCB_NAME privilege. So i tried to set the privilege to the current process by the code available on MSDN http://msdn.microsoft.com/en-us/library/aa446619(VS.85).aspx[^] but it didnt work for me. still it fails by giving error 1314 (A required privilege is not held by the client), if i give the "Act as a part of operating system" privilege from Administrative tools -> local Security Policy -> Local Policy to that particular user, the code works perfectly on win 2k. But how to achive it through code. Thanks, Sandeep