how to kill a process initiated by other user at the same group

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 that kills those processes.

I need your help as soon as possible

Thanks in advance

kick off the process under a generic user_id

common_user_id
>user_A
>user_B

can you illustrate how can i do it because I'm just a beginner

Thanks in advance

Say,

if a process is kicked off by user_A, it will run as user_A ( group grp_A for example )
and a user user_B from the same group grp_A cannot kill that process assuming there is no sudo root privs to the user user_B and this operation will not be permitted by kernel.

So, what can be done is create a common user id : common_user_testing and this user_id to be shared for creating processes which means that user_A can kickstart that and user_B can kill that.

Thanks for your advise

Actually I used something close to what you said

I created an (Execute Only) Script that switches to common user and call the script that creates the process then switch back to the main user, and the same happens when i want to kill the process

Thanks for you Advise, I t was helpful

try setgid, setuid,

which changes the group id, user id on execution,