Ad i told , My main requirement is to trigger a script "abhishektest.sh "whenever a mail come to a user say "abhishek" in my unix server. I dont have root permission.
So, for doing this
1) in /etc/mail/aliases : i need to ask admin to configure so that mail will route through a script.
abhishek : "|/export/home/abhishek/bin/wr_test.sh
2) in wr_test file : i need to put this line, as i have to switch user from root to abhishek.
/usr/local/bin/sudo -u abhsihek /export/home/abhishek/bin/abhishektest.sh
and ask admin to set NOPASSWD rule for this command.
Please let me know if anything wrong in this procedure.or anything else need to be added.
Last edited by mindtee_abhi; 03-17-2009 at 04:34 AM..