Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm looking for an easy way to configure my server, so that whenever a user logs into it, I get an email about it.

Any pointers around how to get this working?

share|improve this question

2 Answers 2

Somebody has already built a notification module for PAM. I would look into downloading that and entering an appropriate configuration line in your related /etc/pam.d/ files.

If your users are restricted in what shells they select and they all process /etc/profile (bash does), you can write a script into that.

share|improve this answer

If your default shell is bash, you can add a sendmail entry to every .bashrc file to notify yourself of user logins.

I am sorry if it does not work that way. I am noob and trying to help you here.

share|improve this answer
2  
Things that may make that an issue: chsh and the ability of a user to edit their own .bashrc. –  Jeff Ferland Mar 31 '12 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.