473,760 Members | 9,717 Online
Bytes | Software Development & Data Engineering Community
+ 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:

ManagementObjec t mo = new ManagementObjec t(new ManagementPath( ));
mo.Scope.Option s.EnablePrivile ges = true;

I am still getting this same error.
I also checked System.Security .Principal.Wind owsIdentity().G etCurrent.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 2316
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*******@disc ussions.com> wrote in message
news:OP******** ******@TK2MSFTN GP14.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:

ManagementObjec t mo = new ManagementObjec t(new ManagementPath( ));
mo.Scope.Option s.EnablePrivile ges = true;

I am still getting this same error.
I also checked System.Security .Principal.Wind owsIdentity().G etCurrent.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
4022
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 to a corporate web site under NT Server 4.0 SP6a /IIS4.0, expressly to retrieve Office documents contained on the server's DASD, but outside the "view" of the web site, which uses home-grown ASP session security. Works great! However, migrating...
1
2897
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 checked on the site in IIS. My problem is that eventhough I am using LogonUser to log on to the server as the user, I am still getting the Windows Authentication Challenge (login window).
3
20503
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 "Control ID not found". I can't find any information on what could be causing this error. Any help would be appreciated. Thanks!
2
5130
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 impersonate me, not the credentials I gave it. LogonUser succeeds only when using LOGON32_LOGON_NEW_CREDENTIALS (9). Any other LogonType causes error 126: Specified module could not be found - whatever that means... The initial...
1
1601
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 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( ));
3
8212
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 Privilege(act as part of operating system).i need to set the SE_TCB_NAME Privilege programatically with out restarting the
9
17613
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, which is in the same domain. So I tried the same on a computer which is not in the same domain. I could not access these files. I saw this in the MSDN: "You cannot use LogonUser to log on to a remote computer" So now I'm a little confused. It is...
1
1932
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 it?
6
1865
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 SE_TCB_NAME privileg - it doesn't work. Then i read somewhere that this only work for local users and not domain users and so the changes in the domain policy don't work. But the strangest thing i've found out after some tests: LogonUser works...
0
10107
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8768
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2733
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.