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. Visual Basic
  4. LOGONUSER

LOGONUSER

Scheduled Pinned Locked Moved Visual Basic
questionjson
5 Posts 2 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.
  • M Offline
    M Offline
    mlauahi
    wrote on last edited by
    #1

    Seems like the documentation says that the API call to Logonuser does not work under the Windows 2000 platform. If I have a username, domain, and password how do I get a token for impersonation? Better yet how do I impersonate this username and password if I don't use Logonuser Thanks

    P 1 Reply Last reply
    0
    • M mlauahi

      Seems like the documentation says that the API call to Logonuser does not work under the Windows 2000 platform. If I have a username, domain, and password how do I get a token for impersonation? Better yet how do I impersonate this username and password if I don't use Logonuser Thanks

      P Offline
      P Offline
      progload
      wrote on last edited by
      #2

      Humm.. I don't see where it seems that at all. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/logonuser.asp[^] Windows 2000: The process calling LogonUser requires the SE_TCB_NAME privilege. If the calling process does not have this privilege, LogonUser fails and GetLastError returns ERROR_PRIVILEGE_NOT_HELD. In some cases, the process that calls LogonUser must also have the SE_CHANGE_NOTIFY_NAME privilege enabled; otherwise, LogonUser fails and GetLastError returns ERROR_ACCESS_DENIED. This privilege is not required for the local system account or accounts that are members of the administrators group. By default, SE_CHANGE_NOTIFY_NAME is enabled for all users, but some administrators may disable it for everyone. For more information about privileges, see Privileges. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconImpersonatingReverting.asp[^] progload

      M 1 Reply Last reply
      0
      • P progload

        Humm.. I don't see where it seems that at all. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/logonuser.asp[^] Windows 2000: The process calling LogonUser requires the SE_TCB_NAME privilege. If the calling process does not have this privilege, LogonUser fails and GetLastError returns ERROR_PRIVILEGE_NOT_HELD. In some cases, the process that calls LogonUser must also have the SE_CHANGE_NOTIFY_NAME privilege enabled; otherwise, LogonUser fails and GetLastError returns ERROR_ACCESS_DENIED. This privilege is not required for the local system account or accounts that are members of the administrators group. By default, SE_CHANGE_NOTIFY_NAME is enabled for all users, but some administrators may disable it for everyone. For more information about privileges, see Privileges. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconImpersonatingReverting.asp[^] progload

        M Offline
        M Offline
        mlauahi
        wrote on last edited by
        #3

        I think I am on the right track. Where do I get a list of what all of these codes mean. I am geeting a failure code of 1314 when I run LogonUser. Thanks

        P 1 Reply Last reply
        0
        • M mlauahi

          I think I am on the right track. Where do I get a list of what all of these codes mean. I am geeting a failure code of 1314 when I run LogonUser. Thanks

          P Offline
          P Offline
          progload
          wrote on last edited by
          #4

          ERROR_PRIVILEGE_NOT_HELD 1314 A required privilege is not held by the client. Here is where to find them: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__1300-1699_.asp[^] progload

          M 1 Reply Last reply
          0
          • P progload

            ERROR_PRIVILEGE_NOT_HELD 1314 A required privilege is not held by the client. Here is where to find them: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__1300-1699_.asp[^] progload

            M Offline
            M Offline
            mlauahi
            wrote on last edited by
            #5

            I figured this out. Whom ever the authenicated user running the application is must have the "Act on behalf of operating system set" under the local security policy settings. If this privledge is not set then LOGONUSER Fauls.

            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