LogonUser failed error

Discussion in 'ASP .Net Security' started by Nimi, Oct 14, 2004.

  1. Nimi

    Nimi Guest

    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 ?
    Nimi, Oct 14, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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 ?
    >
    >
    >
    Martin Dechev, Oct 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mary Chipman

    Re: Impersonation in ASPNET and LogonUser

    Mary Chipman, Sep 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    459
    Mary Chipman
    Sep 3, 2003
  2. Jason

    impersonating and LogonUser

    Jason, Dec 30, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    446
    Jim Cheshire [MSFT]
    Jan 5, 2004
  3. Nimi

    LogonUser failed error

    Nimi, Oct 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,404
    Martin Dechev
    Oct 14, 2004
  4. =?Utf-8?B?U2FqaWQ=?=

    Security Error LogonUser

    =?Utf-8?B?U2FqaWQ=?=, Dec 11, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    354
    Frank Hickman [MVP]
    Dec 11, 2006
  5. Lee Simpson

    LogonUser failed with error code : 1314

    Lee Simpson, Jan 8, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    303
    Lee Simpson
    Jan 9, 2004
Loading...

Share This Page