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. Remote logon

Remote logon

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 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.
  • 4 Offline
    4 Offline
    4apai
    wrote on last edited by
    #1

    hi want to hear your opinion about the next: how to logon remotely to the lan computer i use following code: HANDLE hToken = 0; BOOL bRet = LogonUser("user", "domain", "password", LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &hToken); the function return 0. hToken is set to NULL. and the getlasterror return 'logon failure: unknown user name or password.' i check all parameters for conveniency twicely. in MSDN writes that "You cannot use LogonUser to log on to a remote computer". i think this statement include the answer. then my qeustion is: how to logon user on a remote machine? any ideas? 4apai There're no impossible tasks. There're tasks that required infinite period of time.

    4 1 Reply Last reply
    0
    • 4 4apai

      hi want to hear your opinion about the next: how to logon remotely to the lan computer i use following code: HANDLE hToken = 0; BOOL bRet = LogonUser("user", "domain", "password", LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &hToken); the function return 0. hToken is set to NULL. and the getlasterror return 'logon failure: unknown user name or password.' i check all parameters for conveniency twicely. in MSDN writes that "You cannot use LogonUser to log on to a remote computer". i think this statement include the answer. then my qeustion is: how to logon user on a remote machine? any ideas? 4apai There're no impossible tasks. There're tasks that required infinite period of time.

      4 Offline
      4 Offline
      4apai
      wrote on last edited by
      #2

      ok. i'll redescribe u what i exactly need. i've a local station station1. (i've here an administartor account name1) and had a remote station station2. (i've here an administartor account name2) i logon to station1 with name1 then i need to perform some functionality on station1, which require context of administartor account on station2. so i need to log on name2 account on station2 and then using f.e. createprocessasuser with retrieved user token run process which will perform that functionality. a simple sollution is to add name1.dns_name to administartors group on station2. then i dont need any additional tasks to perform. all functionate perfect. but the problem is, that it is not allowed due to restrictions or project. if i dont explain quite clear or u've any ideas then post me. 4apai There're no impossible tasks. There're tasks that required infinite period of execution time.

      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