473,324 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Can a service running as NetworkService see logged on users?

I've got a windows service running as NetworkService on a WinXP Pro
machine. Is there a way for it to find the Active Directory account of
the logged on user? I don't mind switching the service to run as a
"Domain Admin" if needed, but I *need* to find out the LDAP path for the
user.

Thanks!
Nov 17 '05 #1
1 1231
"Stephen Corey" <swc@_NOSPAM_wardandsmith.com> wrote in message
news:u$**************@tk2msftngp13.phx.gbl...
I've got a windows service running as NetworkService on a WinXP Pro
machine. Is there a way for it to find the Active Directory account of the
logged on user? I don't mind switching the service to run as a "Domain
Admin" if needed, but I *need* to find out the LDAP path for the user.


There isn't necessarily a _single_ logged on user in light of terminal
services, fast user switching etc.

That said, this link

http://msdn.microsoft.com/library/de...n_sessions.asp

shows how to enumerate all of logons on a system and this link

shows how to get information about each one:

http://msdn.microsoft.com/library/de...nformation.asp

The two links should get you started. Please post follow-up in the kernel
group:

microsoft.public.win32.programmer.kernel

Regards,
Will
Nov 17 '05 #2

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

Similar topics

3
by: Andrew Weaver | last post by:
How do you change the port in which CDONTS will look for Microsoft SMTP server? I have Imail running on port 25, and I have SMTP service running on port 26. Any help you can provide me would be...
15
by: Sims | last post by:
Hi, I have a service that need to access the current user registry from time to time. But a service only works as a SYSTEM and not as the current user. How can i change that? Or at the very...
1
by: Marcin Zmyslowski | last post by:
Hello all! I want to create a page in ASP language which gives me information about currently logged users. I thought to do it by this way: when somebody will log in to page, there will be a...
3
by: jliusolar | last post by:
Hi I am trying to figure out why an application get this error when I am trying to open the application's asmx file from localhost. I don't have indexing service running(it set as manual and not...
0
by: Jennyfer J Barco | last post by:
Hello, I have a .NET service running and sometimes, not very often I receive this error "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not...
2
by: SStory | last post by:
I have a service which has no U/I, that I use to ensure a certain tray application is running. I would like for the service which runs under "Local System", to create the process as a normal app...
0
by: nrworld | last post by:
Hi, I have a requirement to find the users logged in to a XP system using a C# service which is running as SYSTEM service. An additional requirement is to start an application on the Active...
2
by: Bill Fuller | last post by:
I am trying to attach to a WCF Web Service running in virtual directory in my local dev box, but not sure how to do it. I tried setting a breakpoint on the .svc and attaching to the Inetinfo...
13
by: snowinfo | last post by:
Hi all, any way to count the number of users i have logged into my site? any help/code appreciated, craig
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.