I have a local admin who cannot stop and start local processes that have been started by SYSTEM.
Is there any policy settings that will allow this.
Thanks. Go Canucks! (rabid Vancouver Canucks Fan)
// killp forces a kill -- it will attempt to enable SeDebugPrivilege
// before opening its process handles, allowing it to kill processes
// running under builtin\system (LocalSystem, to the users out there).
int main( int argc, char *argv[] );
void getDebugPriv( void );
if ( errors || pidCount == 0 )
{
puts( "Usage: killp pid [...]" );
puts( "killp tries to kill the processes specified by the PIDs. If the" );
puts( "user has debug privileges, fkill is able to kill system processes." );
puts( "PIDs may be decimal, octal (starts with 0), or hex (starts with 0x)." );
puts( " "
puts( "PLEASE be aware any process you kill may cause instability."
puts( "NOT responsible for anything you may do to your machine."
return MAXPID + 1;
}
// try to acquire SeDebugPrivilege
getDebugPriv();
errors = 0;
// for each PID:
for ( i = 0; i < pidCount; i ++ )
{
printf( "pid %lu: ", pid );
// open process
hProcess = OpenProcess( PROCESS_TERMINATE, FALSE, pid );
if ( isBadHandle( hProcess ) )
printf( "OpenProcess() failed, err = %lu\n", GetLastError() );
else
{
// kill process
if ( ! TerminateProcess( hProcess, (DWORD) -1 ) )
printf( "TerminateProcess() failed, err = %lu\n", GetLastError() );
else
puts( "killed." );
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.