12-29-2008
How to allow group members to kill process?
Hey
I'm writing a script that creates some processes,and some scripts which kill those processes.
the question is Simply:
How can I allow group members to be able to kill processes created by other member at the same group?
I need your help as soon as possible
Thanks for your help in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I know there is a "groups" command to list the groups a user belongs to, but how about the opposite? Is there a standard command to find out which users belong to a particular group? (2 Replies)
Discussion started by: ovaska
2 Replies
2. UNIX for Advanced & Expert Users
Hi All,
I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages.
How can i terminate this daemon ? ? ?
Regards,
Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies
3. Solaris
Hello Sir,
I want to add some members into a group on NIS domain, but when I run "/usr/ccs/bin/make group" to update the group map it was failed :-(
the error message is :
problem storing develop... (4 Replies)
Discussion started by: lk74612
4 Replies
4. Programming
I've written a python program where I want to allow members of a specific group the ability to kill it, and I'm not sure how to do it. I've been looking at the setuid() and setgid() and similar functions in the os module, but haven't been able to get them to work. I can't seem to change the uid or... (1 Reply)
Discussion started by: vastcharade
1 Replies
5. Shell Programming and Scripting
Is there a command to get a list of group members? Something similar to the groups command, but instead of passing a username and returning groups, you pass it a groupname, and it returns members?
It is difficult to do it manually because the group membership information is split across two... (5 Replies)
Discussion started by: akbar
5 Replies
6. Shell Programming and Scripting
Hey
I'm writing a script that creates some processes,and some scripts which kill those processes.
the question is Simply:
How can I allow a group members to be able to kill (using kill command) processes created by other user at the same group?
and i need the change to be at the script... (5 Replies)
Discussion started by: The Dark Knight
5 Replies
7. Linux
Hi all,
I am new to Linux.Can anyone tell me how to display or list all the members in a group?
Thanks in advance. (9 Replies)
Discussion started by: arthi
9 Replies
8. Solaris
Hi,
I already gone through with old post regarding listing the group members and tried the command
getenv group other
the result is
other::1:root
i listed my part of the /etc/passwd file below
test1:x:100:1::/home/test1:/bin/sh
test2:x:101:1::/home/test2:/bin/ksh... (7 Replies)
Discussion started by: vr_mari
7 Replies
9. Shell Programming and Scripting
Good afternoon
I need to KILL a process in a single command sentence, for example:
kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'`
That sentence Kills the process ID corresponding to the program CAL255.4ge.
However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies
10. UNIX for Advanced & Expert Users
Hi!
I created a group HACKERS and made the user "demo" its member.
$ id demo
uid=500(demo) gid=500(demo) groups=500(demo),502(HACKERS)
$
Next, I granted read and execute permissions to the group "HACKERS" on /var/log/httpd as shown below:
setfacl -m "g:HACKERS:r-x"... (2 Replies)
Discussion started by: indiansoil
2 Replies
LEARN ABOUT OPENSOLARIS
kill
kill(2) System Calls kill(2)
NAME
kill - send a signal to a process or a group of processes
SYNOPSIS
#include <sys/types.h>
#include <signal.h>
int kill(pid_t pid, int sig);
DESCRIPTION
The kill() function sends a signal to a process or a group of processes. The process or group of processes to which the signal is to be
sent is specified by pid. The signal that is to be sent is specified by sig and is either one from the list given in signal (see sig-
nal.h(3HEAD)), or 0. If sig is 0 (the null signal), error checking is performed but no signal is actually sent. This can be used to check
the validity of pid.
The real or effective user ID of the sending process must match the real or saved (from one of functions in the exec(2) family) user ID of
the receiving process, unless the privilege {PRIV_PROC_OWNER} is asserted in the effective set of the sending process (see Intro(2)), or
sig is SIGCONT and the sending process has the same session ID as the receiving process. A process needs the basic privilege
{PRIV_PROC_SESSION} to send signals to a process with a different session ID. See privileges(5).
If pid is greater than 0, sig will be sent to the process whose process ID is equal to pid.
If pid is negative but not (pid_t)-1, sig will be sent to all processes whose process group ID is equal to the absolute value of pid and
for which the process has permission to send a signal.
If pid is 0, sig will be sent to all processes excluding special processes (see Intro(2)) whose process group ID is equal to the process
group ID of the sender.
If pid is (pid_t)-1 and the {PRIV_PROC_OWNER} privilege is not asserted in the effective set of the sending process, sig will be sent to
all processes excluding special processes whose real user ID is equal to the effective user ID of the sender.
If pid is (pid_t)-1 and the {PRIV_PROC_OWNER} privilege is asserted in the effective set of the sending process, sig will be sent to all
processes excluding special processes.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, no signal is sent, and errno is set to indicate the error.
ERRORS
The kill() function will fail if:
EINVAL The sig argument is not a valid signal number.
EPERM The sig argument is SIGKILL and the pid argument is (pid_t)-1 (that is, the calling process does not have permission to send the
signal to any of the processes specified by pid).
The effective user of the calling process does not match the real or saved user and the calling process does not have the
{PRIV_PROC_OWNER} privilege asserted in the effective set, and the calling process either is not sending SIGCONT to a process
that shares the same session ID or does not have the {PRIV_PROC_SESSION} privilege asserted and is trying to send a signal to a
process with a different session ID.
ESRCH No process or process group can be found corresponding to that specified by pid.
USAGE
The sigsend(2) function provides a more versatile way to send signals to processes.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
kill(1), Intro(2), exec(2), getpid(2), getsid(2), setpgrp(2), sigaction(2), sigsend(2), signal(3C), signal.h(3HEAD), attributes(5), privi-
leges(5), standards(5)
SunOS 5.11 22 Mar 2004 kill(2)