Re: How to execute a process remotely using a different username?

I can use LogonUser function to get a token and can use it to impersonate
the thread which will execute the job for me, though, i want to avoid
calling LogonUser because i might not have the password of the user, whose
account is used to impersonate the job execution thred.

Will the combination of LookupAccountName, OpenThreadToken,
SetTokenInformation and SetThreadToken APIs satisfy my requirements?

Commercial or a restricted GPL?

> Sysinternals will license the source code.
>
> “Veerapuram Varadhan” wrote in message
>> news:xxxxx@ntdev…
>>>
>>> Dear All,
>>>
>>> I am currently writing a tiny grid computing components like a Load
>>> Manager, Load agents, scheduler and dispatcher. I need to execute user
>>> jobs submitted to this grid components remotely on client machines
>>> (execution hosts). These jobs needs to be executed on the same user
>>> context who submitted the job.
>>>
>>> For example, User-A from PC-A has submitted a job, Job-A, which will be
>>> executed on PC-B, but the currently logged in user of PC-B is User-B.
>>> My
>>> dispatcher should be able to run the job in PC-B under User-A’s context
>>> (like “RSH” command, but i am not running any “RSH” service on client
>>> machines.)
>>>
>>> Kindly throw some suggestions and guidelines as i am struck with no
>>> clues.
>>> I saw one example in “http://www.sysinternals.com/files/PsLogList.zip
>>> that dumps the event logs from any machine and even accepts username
>>> and
>>> passwords to connect to the remote machine. Unfortunately, it contains
>>> only the binary (EXE).
>>>
>>> Links to any material is also highly appreciated.
>>>
>>> Thanking you all in advance.
>>>
>>> Best Regards,
>>>
>>> V. Varadhan.
>>>
>>>
>>> –
>>> Veerapuram Varadhan,
>>> Systems Engineer,
>>> California Digital,
>>> Bangalore - 68.
>>> Ph- (080)-5502999
>>>
>>>
>>>
>>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@cdclinux.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>
>
> –
> Veerapuram Varadhan,
> Systems Engineer,
> California Digital,
> Bangalore - 68.
> Ph- (080)-5502999
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cdclinux.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Veerapuram Varadhan,
Systems Engineer,
California Digital,
Bangalore - 68.
Ph- (080)-5502999