Shell Scripting Tutorial-56: Know when users log in Part One
38.7K views on YouTube
In this tutorial we’ll build a script that checks for a user every minute and then notifies us when it logs in and also displays the time the user was late in logging in.