Script to Send Email to a user when an admin kills process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to Send Email to a user when an admin kills process
# 1  
Old 09-02-2011
Script to Send Email to a user when an admin kills process

Can anyone create or give me a script that I can use to email a user automatically when I kill one of their processes?

Or

Can you give me a script to allow me to email a user (entering email manually) when a process is killed? Like showing what the PID was and a reason the admin killed it? Is this possible?
# 2  
Old 09-02-2011
Yes, it is possible.
But, I am afraid, no one has enough time to write down a script for you.
Why don't you try out by yourself and reply back if you face any issue?
# 3  
Old 09-02-2011
I assume that you have are a regular UNIX user or even have some basic shell scripting knowledge if so,
Try to adapt the following scripts posted here and here to satisfy your needs.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to send email if Java process was done

Hi Team, I need script to send notification if java process was down. Can you please help on this. Thanks in adance. Regards, Nagesh (1 Reply)
Discussion started by: Nageswara Reddy
1 Replies

2. Shell Programming and Scripting

Automated script once user send email to UNIX server

is there any possibility to trigger a script. once the user send email to the unix server box with specific subject line. My script will search for the specific word in the unix email and run the shell script if the specific keyword is sent in the email to the unix email box. so that it can... (3 Replies)
Discussion started by: ramkumar15
3 Replies

3. Red Hat

Problem with Script to email Admin users with expired passwords writed byygemici

Hi, I have problem with a script, it was working for 6 month and suddenly I started getting strange expire times example: # chage -l wXXp Last password change : Oct 28, 2014 Password expires : Nov 27, 2014 Password... (3 Replies)
Discussion started by: redmansas
3 Replies

4. Shell Programming and Scripting

Send one email per user

I created a bash script that gets a file formats it, sends an email to the user(s), however, for whatever reason, it will send an email per line with all of the lines in it, so essentially the user will get 10 duplicate emails with the same 10 results. I've modified the script to put the results of... (2 Replies)
Discussion started by: hotdang
2 Replies

5. Red Hat

Postfix - want to send email to some non-existent user using alias

Hi, I know how to use email redirection using /etc/aliases file + postfix combination and it is working fine for existing users. The question I have is: I want to send an email to tony@server1.example.com while tony user is actually not there. Rather, I want to redirect that email to... (0 Replies)
Discussion started by: freebird8z
0 Replies

6. Shell Programming and Scripting

Write a scripts to kill idle user for 60 min. & email user list to admin in text file

Folks, I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3) List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Discussion started by: sumit30
4 Replies

7. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

8. UNIX for Advanced & Expert Users

Send email as a different user than the user logged in

Hi I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in. something like do-not-reply@xyz.com Thank you. (1 Reply)
Discussion started by: rakeshou
1 Replies

9. Shell Programming and Scripting

How to get rid of message when script kills process it started?

When I run the following script I get the following error message whcih I would like to suppress when the kill is issued: ./kill.sh: line 13: 31854 Killed nc -l -p 12345 Script: #!/bin/bash echo running nc in the background nc -l -p 12345 & PID=$! echo nc pid: $PID ... (1 Reply)
Discussion started by: cmarkle
1 Replies

10. Shell Programming and Scripting

Send email to user when condition met

Hi all, I plan to write a shell script to inform users on their task when certain condition met. example: If a then email user on action a else email user on action b. I'm pretty new in scripting, appreciate any suggestions. Thanks. (4 Replies)
Discussion started by: *Jess*
4 Replies
Login or Register to Ask a Question