Re: LogonUser failed error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Martin Dechev (detcheff__at_hotmail.com)
Date: 10/14/04


Date: Thu, 14 Oct 2004 15:40:29 +0200

Hi,

If I understand correctly that you are trying to invoke LogonUser (in
AdvApi32.dll), the documentation for the function clearly states that for
Windows 2000 the process calling LogonUser needs to have SE_TCB_NAME (Act as
part of the operating system) privilege.

http://msdn.microsoft.com/library/en-us/secauthn/security/logonuser.asp
(in the remarks section)

Greetings
Martin
"Nimi" <anonymous@discussions.com> wrote in message
news:OPwOqxesEHA.3412@TK2MSFTNGP14.phx.gbl...
> When I run my application , the LogonUser method fails the exception is
> "LogonUser failed with error code :1314".
> I know the error is because of some privileges .
>
> I am using Windows 2000 sp4. I have not enabled the SE_TCB_NAME
previlege.
> Do we need to enable this ?
>
> I enabled privileges using this:
>
> ManagementObject mo = new ManagementObject(new ManagementPath( ));
> mo.Scope.Options.EnablePrivileges = true;
>
> I am still getting this same error.
>
>
> I also checked System.Security.Principal.WindowsIdentity().GetCurrent.Name
> It returns "@\machine_name\ASPNET"
>
> But to the user "ABC" I have enabled the TCB privileges .
>
> What am I missing ?
>
>
>



Relevant Pages

  • Re: Win2000 Impersonation weirdness? (or is it a conundrum?)
    ... But why does the XP box work (allowing LogonUser calls from a process ... running without SE_TCB_NAME) while the Win2K does not? ... And what specifically do you mean by "system privileges"? ... > Is the server joined to a domain? ...
    (microsoft.public.security)
  • Re: Win2000 Impersonation weirdness? (or is it a conundrum?)
    ... But why does the XP box work (allowing LogonUser calls from a process ... running without SE_TCB_NAME) while the Win2K does not? ... And what specifically do you mean by "system privileges"? ... > Is the server joined to a domain? ...
    (microsoft.public.win2000.security)
  • Re: CreateProcessWithLogonW error
    ... I would recommend just using LogonUser. ... to write code to turn those privileges on either. ... There is an additional restriction with CreateProcessWithLogonW that you may ... > service) and create a named pipe between the Apache service and this ...
    (microsoft.public.platformsdk.security)
  • Re: CreateProcessAsUser error "the client does not have the required priviledges"
    ... LogonUser again? ... ImpersonateLoggedUser (my process have administrator privileges) ... but if I execute it under unprivileged ...
    (microsoft.public.platformsdk.security)
  • Re: LogonUser failed error
    ... Windows 2000 the process calling LogonUser needs to have SE_TCB_NAME (Act as ... > I know the error is because of some privileges. ... > I enabled privileges using this: ...
    (microsoft.public.dotnet.framework.aspnet.security)