views:

104

answers:

1

Is it possible to impersonate a u/p on a remote computer?

Ideally I would like to call the ImpersonateLoggedOnUser with a token I would obtain from logging into a remote computer.

I know I can make a valid connection using wnet functions, but just don't know about impersonation.

+1  A: 

Brian:

I'm not sure whether you can. At the very least, you may need some way to indicate which logged on user (fast user switching and terminal services means that there may be more than one logged on user). Raymond Chen blogged about this once, but there was no solution offered (I'm not sure if there is one, unless maybe you can assume that there will only be one, but given that Vista allows fast user switching on a domain, I'm not sure that you can make that assumption).

For what it's worth, the blog entry is here: http://blogs.msdn.com/oldnewthing/archive/2006/08/22/712677.aspx

JMarsch