Re: CreateProcessAsUser error "the client does not have the required priviledges"

From: Yu Chen [MS] (yuchen_at_online.microsoft.com)
Date: 07/20/04


Date: Mon, 19 Jul 2004 17:20:48 -0700

I don't know how to automate the logon and logoff. The impersonation
approach won't work as the API is checking the primary process token.

As I said in the other reply, the easier solution is to use the
CreateProcessWithLogonW API.

-- 
Yu Chen [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Victor Pereira" <taintmode@yahoo.com.br> wrote in message
news:ueHvs3YbEHA.384@TK2MSFTNGP10.phx.gbl...
> Yu Chen [MS] wrote:
> > After you grant a certain privilege to an account, you need to log off
and
> > log back for it to take effect.
> >
> How can i programatically do the log of and logon ? In a program like
> this, should i write a program to adjust the permission, logout and then
>   i run the program to do the Impersonate ?
>
> Thanks,
>
> VP


Relevant Pages

  • Re: CreateProcessAsUser error "the client does not have the required priviledges"
    ... > I don't know how to automate the logon and logoff. ... The impersonation ... > approach won't work as the API is checking the primary process token. ... > CreateProcessWithLogonW API. ...
    (microsoft.public.platformsdk.security)
  • RE: LogonUser() API blocks with wrong credentials
    ... I heard something relevant with Windows NT, ... Access Denied error when you call LogonUser API ... able to logon as a service and do successful impersonation. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Using ImpersonateLoggedOnUser
    ... >using the .NET API, ... >> service in order to perform impersonation for the ... >> still using the local SYSTEM account, ... >> does not have access to printers (unless the registry is ...
    (microsoft.public.dotnet.framework)
  • Re: usercode / password verification
    ... > consider impersonation of the user who is talking to your service via ... > one of the various ImpersonateXXX functions and control access ... > to secure objects with DACLs. ... Which API to use ...
    (microsoft.public.win32.programmer.kernel)
  • LogonUser() API blocks with wrong credentials
    ... We are using Windows APIs to impersonate a user in an application that runs ... The Local System account has all the privileges required for impersonation. ... However, if the password passed to LogonUserAPI is incorrect, the call is ... For impersonation we are calling LogonUser() API ...
    (microsoft.public.win32.programmer.wmi)