[Sunhelp] su notification

John Kennedy jkennedy at orent.com
Mon Feb 21 14:37:02 CST 2000


Moshe Levy wrote:
> 
> How can i configure solaris to send email to root when ever (and soon
> as) some user is makeing 'su' to some other account ?
> and notify in the mail who made 'su' and to which account.
> 
> Thanks.
> 
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp

Try replacing the su binary with a script such as
_______________cut _________________
#!/bin/ksh
chg = '`whoami` is switching to $1
cat /dev/null | mailx -s $chg user-root at system.com
su $1
______________cut___________________

or something similar...
John 
-- 
If you receive something that says "Send this to everyone you 
know," PLEASE pretend you don't know me.

Your anti-Microsoft signatures for Monday are...

I sense much NT in you.  NT leads to bluescreen, bluescreen leads to
downtime, downtime leads to suffering.  NT is the path to the darkside.
Powerful UNIX is
 - Jedi SysAdmin

Your mouse has moved. Windows must be restarted for the change to take
effect. Reboot now?






More information about the SunHELP mailing list