Script Help -- documenting specific users that log into server

Hello All,

I am trying trying to write a shell script that will do a couple things:

1.) Identify any username that logs into the server.

2.) When the user logs out, send them an email detailing
their log in/out times, duration logged in, and what
processes they ran.

Basically, I need help with which commands I should employ and how to send the emails. Any advice or syntax is much appreciated. Thanks!!

Commands you will be interested in are who and mail . Check the man page for moe info.

HTH
--ahamed

Welcome to Unix.com forum.
Look like this is your very first post on this forum but you ignored to read the forum rules first.
Your post look like a homework/assignment and we have special rules for this type of posts/questions.
Please reconsider, read the forum rules and post in the appropriate forum.

Welcome to the forums and greetings to Bristol /RWU. And danmero is right, homework goes here, with special rules.