email when user su's to root

Bradley Caricofe brad at caricofe.com
Mon Mar 16 01:53:16 UTC 2009


I put this in root's .bash_profile:

echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root
Access from `who | awk '{print $6}'`" me at domain.com

> -----Original Message-----
> From: redhat-list-bounces at redhat.com 
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of Anne Moore
> Sent: Friday, March 13, 2009 9:44 AM
> To: redhat-list at redhat.com
> Subject: email when user su's to root
> 
> 
> HI All,
>  
> Does anyone know how I'd make an automatic email fly off 
> every time a user SU's to root? We're have security issues, 
> and we're needed to track it.
>  
> Thank you for your assistance with this.
>  
> Anne
> -- 
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list




More information about the redhat-list mailing list