RE: Windows Authentication

From: Alvin Zhao[MSFT] (alvinzh@online.microsoft.com)
Date: 01/07/03


From: alvinzh@online.microsoft.com (Alvin Zhao[MSFT])
Date: Tue, 07 Jan 2003 11:49:19 GMT


Hi,

As a follow-up of Eran's reply, you can perform your own impersonation in
order to create a thread token that does have network access. The LogonUser
and ImpersonateLoggedOnUser functions can be used to impersonate a
different account. This requires that you have the clear text username and
password of another account available to your code. LogonUser also requires
that the account that calls it has the "Act as part of the operating
system" privilege in User Manager.

To do this, you can use LogonUser to get an impersonation token for the
specified user, and then call ImpersonateLoggedOnUser to impersonate that
user on the current thread. Then any calls that you make through ADO on
that same thread should use the current thread's token when making the
integrated security connection to SQL Server.

Sincerely,

Alvin Zhao
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Relevant Pages

  • Re: impersonation problem - any good resources ?
    ... "The LogonUser function attempts to log a user on to the local computer. ... > allow ' proper execution presents a security risk. ... > Imports System.Runtime.InteropServices ... It seems to me that it means that if the impersonation took, ...
    (microsoft.public.dotnet.security)
  • Re: Impersonation through HttpModule
    ... Programmatic impersonation on IIS5 is painful because normal accounts can't ... call the LogonUser API on Win2K. ... have a process account for each app as there is only one process. ...
    (microsoft.public.dotnet.security)
  • Re: Impersonation using WindowsIdentity( upn ) ctor
    ... You can definitely impersonate a token created with LogonUser. ... the token returned by the API will either be an Impersonation ... >> privilege. ... By default, only the SYSTEM account ...
    (microsoft.public.dotnet.security)
  • Re: Impersonation using WindowsIdentity( upn ) ctor
    ... You can definitely impersonate a token created with LogonUser. ... the token returned by the API will either be an Impersonation ... >> privilege. ... By default, only the SYSTEM account ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Impersonation and UNC network resources
    ... You definitely need to have your laptop be a domain member if you want to ... authenticate a domain account using LogonUser. ... 1314 if the account you are running under really has "act as OS" privilege. ... to run as the required domain user (and turn off impersonation). ...
    (microsoft.public.dotnet.framework.aspnet.security)