Re: LogonUser fails across different domains
From: Drew Cooper [MSFT] (dcoop_at_online.microsoft.com)
Date: 01/29/04
- Next message: Rhett Gong [MSFT]: "RE: CAPICOM Thread Capability?"
- Previous message: Prasanna Padmanabhan: "LogonUser fails across different domains"
- In reply to: Prasanna Padmanabhan: "LogonUser fails across different domains"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 28 Jan 2004 20:26:45 -0800
You shouldn't be able to log on as a user from an untrusted domain (except
as guest). And you shouldn't need to do an impersonate to access files on a
different server.
You should be able to log on as DomainA\UserA, "net use" (Or NetUseAdd or
WNetAddConnection2/3 APIs) to some other machine in DomainB as DomainB\UserB
and access files there.
Is that what you wanted or am I missing something?
I wonder if you're really meaning to ask about the Cred* APIs. . .
-- Drew Cooper [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. "Prasanna Padmanabhan" <prasannap@citrix.nospam.com.> wrote in message news:OyyO1kh5DHA.3548@TK2MSFTNGP11.phx.gbl... > LogonUser() fails if the user (specified as parameter) is in a domain > different from that with which the executing process is running as. > For example, if the process that is executing LogonUser is running as > DomainA\UserA and if I want to LogonUser as DomainB\UserA it fails (unless > DomainA and DomainB have some sort of trust relationship). > > My question is this:- > --------------------- > > Can one of you gurus please tell me what is the workaround for this is? That > is how can I get a user's token from LogonUser if the domains are different. > My intention is to get the user's token from the LogonUser call and make my > executing process run as that user (impersonation), and then use that > "impersonated user" to access remote file shares (that are on a different > domain). > > I did several google searches and all of them agree that LogonUser does not > work across different untrusted domains, but they don't offer a solution. > > Thanks a lot! > Prasanna > >
- Next message: Rhett Gong [MSFT]: "RE: CAPICOM Thread Capability?"
- Previous message: Prasanna Padmanabhan: "LogonUser fails across different domains"
- In reply to: Prasanna Padmanabhan: "LogonUser fails across different domains"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|