473,769 Members | 3,102 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 ?

Nov 18 '05 #1
1 1603
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 ?

Nov 18 '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
2324
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( ));
1
2898
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
814
by: Zeno Lee | last post by:
I'm trying to authenticate a user against a windows network. I want it to work across any kind of windows network from NT 4.0 up to Windows 2003 ADS. So far I've been using DirectoryEntry and DirectorySearcher and doing a search on Active Directory. With the addition of a customer on an NT 4.0 network, I've had to add DllImport using LogonUser() from advapi32.dll in addition to the directory search. To simplify my code, Is it...
3
20504
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
5131
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...
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
17614
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
1866
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
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10222
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
10050
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
9999
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
9866
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
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
5310
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
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

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.