Thursday, February 27, 2014

Bash - Send Email Reminder

This script will send email reminder to admins

#!/bin/sh 

# Simple Script that runs at 8AM every 90 Days and sends email to admins 
#to remind them to change the root password. 

# 
/usr/sbin/sendmail todd.walters @  myDom.com < /home/twalters/scripts/Reminder.htm 

Exit 


------------------------------------------------------------------------------------------------------ 


Reminder HTML Page 


To: Admins@mYDom.xom 
Subject: Reminder: Time to Change Root Password 
Content-Type: text/html; charset="us-ascii" 

<html> 
<body> 
<h2>90 DAY PASSWORD REMINDER<br></h2> 
</br> 
<h3>The root user password must be changed every 90 days</h3> 
<p></p> 
For more instructions see: <a href="http://MyOneNote/Linux%20Library/Linux%20How-To%20Documents/How%20To%20Change%20Root%20Password.aspx">How To Change Root Password</a>  
</body 
</html 

No comments:

Post a Comment