Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. LogOnUser fails on Win 2k

LogOnUser fails on Win 2k

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiocomsecuritytoolsjson
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sandeepkavade
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups