Re: How to get the owner of a process?

From: Pavel Lebedinsky [MSFT] (pavel_at_online.microsoft.com)
Date: 06/16/05


Date: Thu, 16 Jun 2005 00:33:49 -0700

By default, security descriptors of tokens for regular (non-system,
non-admin) users don't give any access to Administrators. And
SeDebugPrivilege doesn't help because it only works for processes
and threads, not tokens.

You could move your code into a service running as System.
System should have query rights on most tokens.

Another option is to use WTSEnumerateProcesses. This seems
to work on all current OSes (that is, admins can query the SIDs
for all processes in the system). The problem with this approach
is that I'm not sure whether the fact that it works is by design, or
just an artifact of the current implementation.

-- 
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Sudhakar Govindavajhala" wrote:
> I am having   trouble in finding out who the owner of a process is,
> orogrammatically. Can someone help?     I am admin of the machine and I am
> running with debug privilege enabled.   I am not able to open the process
> token for me to query it.
> It works for lsass.exe.  But it fails for alg.exe owned by NT Auth\Local
> service. I get access denied error for alg.exe


Relevant Pages

  • Re: Imitating Mail Merge on server
    ... given moment we know which data (in this case, customers) is being worked ... and concantenate each query together. ... loop the array, plug in the current recordset value. ... We have close to fifty tokens that we use in the application correspondence, ...
    (microsoft.public.inetserver.asp.general)
  • Re: C# 2.0 + MS Access == Error
    ... All the tokens are perfectly fine. ... If you are completely sure that the query tokens are all correct, ... DataTabledatatables, Int32 startRecord, Int32 maxRecords, String ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# 2.0 + MS Access == Error
    ... I believe the error is indicating that one or more of the tokens that you are ... If you are completely sure that the query tokens are all correct, ... DataTabledatatables, Int32 startRecord, Int32 maxRecords, String ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ...
    (microsoft.public.dotnet.languages.csharp)
  • oracle xmltype - tricky queries needed :-)
    ... I have two questions concerning the usage of oracle text on XMLType columns. ... when I perform the following query... ... Another related problem I have to to solve is: When searching two tokens the ...
    (comp.databases.oracle.misc)