473,473 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

LogonUser failed error

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().GetCur rent.Name
It returns "@\machine_name\ASPNET"

But to the user "ABC" I have enabled the TCB privileges .

What am I missing ?

Jul 21 '05 #1
1 2284
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.../logonuser.asp
(in the remarks section)

Greetings
Martin
"Nimi" <an*******@discussions.com> wrote in message
news:OP**************@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().GetCur rent.Name
It returns "@\machine_name\ASPNET"

But to the user "ABC" I have enabled the TCB privileges .

What am I missing ?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mike | last post by:
Any help would be greatly appreciated. Based on MS KB article Q248187 (HOWTO: Impersonate a User from Active Server Pages), I developed an ActiveX DLL (using VB6.0 Enterprise SP5), and deployed...
1
by: Rich | last post by:
I am running IIS6 on a Win2k3 server. I have an ASP.Net app (C#) that a user logs into and then I use LogonUser to validate them and log them onto the server. I have Windows Authentication ONLY...
3
by: Dan | last post by:
All, I am attempting to use the LogonUser API in an application. However, everytime I attempt to validate an account using this I get an error. The code is 1421 which has a description of...
2
by: BLiTZWiNG | last post by:
Having a few strage behaviours with this function, mainly in that when I try to logon to another computer with a different name/pass to the current user of the local machine, it tries to...
1
by: Nimi | last post by:
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...
3
by: plmanikandan | last post by:
Hi, i need to use logonuser api in c# for windows 2000. Logonuser api is working fine in windowsXp,Windows2003 server.in windows 2000 for running logonuser api we need SE_TCB_NAME ...
9
by: schaf | last post by:
Hi NG ! I used the examples on the internet to create a Impersonate class which allows me to log on as another user. After logged on as the new user I could access files on a remote computer,...
1
by: Sajid | last post by:
I use LogonUser for user authentication against AD. When I run this in XP is works fine. But it gives me a Win32 Error 1314 (ERROR_PRIVILEGE_NOT_HELD) in Win 2000. Any idea why and how do I solve...
6
by: nild | last post by:
Hello i have a strange problem. I'm using LogonUser to impersonate the user under which my program must run. On Win XP or Server 2003 it works. But on 2000 it doesn't. So i found out, to set...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.